Permalink
Browse files

Suppress a bogus cppcheck warning

  • Loading branch information...
krader1961 committed Sep 19, 2018
1 parent a84e549 commit dac084a9130a5419d3f2cf1b110e1e594a979f53
Showing with 7 additions and 2 deletions.
  1. +1 −1 bin/lint
  2. +6 −1 src/lib/libast/path/pathprog.c
View
@@ -190,7 +190,7 @@ then
do
flags=( $(../scripts/extract_flags ${project_file} "${c_file}") )
cppcheck "${lint_args[@]}" \
"${flags[@]}" \
"${flags[@]}" -D_CPPCHECK \
-q --verbose --std=c99 --std=posix --language=c \
--suppress=missingIncludeSystem --inline-suppr \
--enable="${cppchecks}" --rule-file=../.cppcheck.rules \
@@ -43,7 +43,12 @@
#include "ast_windows.h"
#endif
#if _hdr_mach_o_dyld
// Including this header results in this bizarre warning:
// [/usr/include/libkern/OSByteOrder.h:301] error (preprocessorErrorDirective):
// #error Unknown endianess.
// There isn't anything wrong with the include and the error doesn't happen when compiling the code.
// So suppress the include if being checked by cppcheck.
#if _hdr_mach_o_dyld && !_CPPCHECK
#include <mach-o/dyld.h>
#endif

0 comments on commit dac084a

Please sign in to comment.