lebedev.ri added a comment.

This warning complains about macros from system headers, e.g. 
`PTHREAD_MUTEX_INITIALIZER`:

  $ ninja -j1 -v
  [1/110] /usr/bin/cmake -E __run_iwyu --tidy=/usr/local/bin/clang-tidy 
--source=../src/librawspeed/common/DngOpcodes.cpp -- /usr/local/bin/clang++  
-DDEBUG -Isrc -I../src/librawspeed -std=c++11 -Wall -Wextra -Weverything 
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion 
-Wno-covered-switch-default -Wno-deprecated -Wno-double-promotion 
-Wno-exit-time-destructors -Wno-global-constructors 
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded 
-Wno-sign-conversion -Wno-switch-enum -Wno-undefined-func-template 
-Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables -O1 
-fno-optimize-sibling-calls -fsanitize=thread -fPIC   -march=native -g3 -ggdb3 
-Werror -MD -MT src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
-MF src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o.d -o 
src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o -c 
../src/librawspeed/common/DngOpcodes.cpp
  FAILED: src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
  /usr/bin/cmake -E __run_iwyu --tidy=/usr/local/bin/clang-tidy 
--source=../src/librawspeed/common/DngOpcodes.cpp -- /usr/local/bin/clang++  
-DDEBUG -Isrc -I../src/librawspeed -std=c++11 -Wall -Wextra -Weverything 
-Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion 
-Wno-covered-switch-default -Wno-deprecated -Wno-double-promotion 
-Wno-exit-time-destructors -Wno-global-constructors 
-Wno-gnu-zero-variadic-macro-arguments -Wno-old-style-cast -Wno-padded 
-Wno-sign-conversion -Wno-switch-enum -Wno-undefined-func-template 
-Wno-unused-macros -Wno-unused-parameter -Wno-weak-vtables -O1 
-fno-optimize-sibling-calls -fsanitize=thread -fPIC   -march=native -g3 -ggdb3 
-Werror -MD -MT src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o 
-MF src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o.d -o 
src/librawspeed/CMakeFiles/rawspeed.dir/common/DngOpcodes.cpp.o -c 
../src/librawspeed/common/DngOpcodes.cpp
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[clang-diagnostic-zero-as-null-pointer-constant]
    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                            ^
  /usr/include/pthread.h:87:41: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
    { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
                                          ^
  In file included from ../src/librawspeed/common/DngOpcodes.cpp:25:
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[-Werror,-Wzero-as-null-pointer-constant]
    pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                            ^
  /usr/include/pthread.h:87:41: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
    { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
                                          ^
  In file included from ../src/librawspeed/common/DngOpcodes.cpp:25:
  ../src/librawspeed/common/Mutex.h:98:27: error: zero as null pointer constant 
[-Werror,-Wzero-as-null-pointer-constant]
  /usr/include/pthread.h:87:44: note: expanded from macro 
'PTHREAD_MUTEX_INITIALIZER'
    { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
                                             ^
  2 errors generated.
  ninja: build stopped: subcommand failed.


https://reviews.llvm.org/D32914



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to