Closed cwsmith closed 6 years ago
I think these ought to be fixed in the code instead of just silenced... can you send the output before silencing?
OK.
-Wzero-as-null-pointer-constant
[ 5%] Building CXX object CMakeFiles/gmodel.dir/gmodel.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --std=c++11 -O2 -g -fno-omit-frame-pointer -ferror-limit=1 -Werror -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-float-equal -Wno-weak-template-vtables -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/gmodel.dir/gmodel.cpp.o -c /Users/cwsmith/develop/gmodel/gmodel.cpp
/Users/cwsmith/develop/gmodel/gmodel.cpp:33:21: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant]
/* LOOP = */ 0,
^
nullptr
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 errors generated.
-Wunused-template
[ 5%] Building CXX object CMakeFiles/gmodel.dir/gmodel.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --std=c++11 -O2 -g -fno-omit-frame-pointer -ferror-limit=1 -Werror -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded -Wno-float-equal -Wno-weak-template-vtables-Wno-zero-as-null-pointer-constant -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o CMakeFiles/gmodel.dir/gmodel.cpp.o -c /Users/cwsmith/develop/gmodel/gmodel.cpp
/Users/cwsmith/develop/gmodel/gmodel.cpp:67:12: error: unused function template 'size'
[-Werror,-Wunused-template]
static int size(std::vector<T> const& v) {
^
1 error generated.
I just pushed a commit, let me know if it helps.
Using the nullptr
in a few other spots results in a clean build and all tests passing (100% tests passed, 0 tests failed out of 7
). I reset the CMakelists.txt
changes and commited to this branch (osx-clang-warnings
d3eefc3).
This PR silences some warnings from clang on my macbook running High Sierra (
10.13.4 (17E202)
).