Skip to content

Commit

Permalink
Close the zero variadic macro warning for Clang
Browse files Browse the repository at this point in the history
Add -Wno-strict-prototypes and -Wno-static-in-inline
  • Loading branch information
zhaoxi-scut committed Nov 23, 2024
1 parent 6d0f9e0 commit 0106e3e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ endif()

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Werror)
# add_compile_options(-Wpedantic)
add_compile_options(-Wpedantic)
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
add_compile_options(
-Wno-gnu-zero-variadic-macro-arguments
-Wno-strict-prototypes
-Wno-static-in-inline
)
endif()
add_compile_options(-Wno-shift-negative-value)
endif()

Expand Down

0 comments on commit 0106e3e

Please sign in to comment.