Skip to content

Commit deb3893

Browse files
committed
Resolve '-Wzero-as-null-pointer-constant' warning
1 parent 2265d64 commit deb3893

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ifeq ($(WARN),1)
22
ifeq ($(CXX),g++)
3-
WARN_FLAGS = -O3 -g -Wall -Wextra -Werror # -Weffc++
3+
WARN_FLAGS = -O3 -g -Wall -Wextra -Wzero-as-null-pointer-constant -Werror # -Weffc++
44
else ifeq ($(CXX),clang++)
5-
WARN_FLAGS = -O3 -g -Wall -Wextra -Werror
5+
WARN_FLAGS = -O3 -g -Wall -Wextra -Wzero-as-null-pointer-constant -Werror
66
else ifeq ($(CXX),icpc)
77
WARN_FLAGS = -O3 -ipo -g -Wall -wd981 -wd383 -wd2259 -Werror # -Weffc++
88
endif

OptionParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Values {
7676
class Option {
7777
public:
7878
Option(const OptionParser& p) :
79-
_parser(p), _action("store"), _type("string"), _nargs(1), _callback(0) {}
79+
_parser(p), _action("store"), _type("string"), _nargs(1), _callback(nullptr) {}
8080
virtual ~Option() {}
8181

8282
Option& action(const std::string& a);

0 commit comments

Comments
 (0)