From 0adff57e2cfdd85a09d17cb1cdc54486a492c4ea Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Thu, 8 Aug 2024 16:02:11 -0400 Subject: [PATCH] Sync warning flags between Makefile and CMakeLists.txt --- CMakeLists.txt | 8 ++++---- Makefile | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 776247ef..f8859a31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,11 +60,11 @@ else() add_compile_options(-Werror -Wextra -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wlogical-op -Wnull-dereference -Wshift-overflow=2 - -Wstringop-overflow=4 -Wstrict-overflow=5 -Wundef -Wuninitialized -Wunused - -Wshadow # TODO: -Wshadow=compatible-local ? + -Wstringop-overflow=4 -Wundef -Wuninitialized -Wunused + -Wshadow # TODO: -Wshadow=compatible-local? -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 - -Wno-format-nonliteral # We have a couple of "dynamic" prints - # We do some range checks that are always false on some platforms (GCC, Clang) + -Wno-format-nonliteral -Wno-strict-overflow + -Wno-unused-but-set-variable # bison's `yynerrs_` is incremented but unused -Wno-type-limits -Wno-tautological-constant-out-of-range-compare -Wvla # MSVC does not support VLAs -Wno-unknown-warning-option) # Clang shouldn't diagnose unknown warnings diff --git a/Makefile b/Makefile index 024d7621..2e07a036 100644 --- a/Makefile +++ b/Makefile @@ -208,12 +208,10 @@ develop: $Q${MAKE} WARNFLAGS="${WARNFLAGS} -Werror -Wextra \ -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond \ -Wfloat-equal -Wlogical-op -Wnull-dereference -Wshift-overflow=2 \ - -Wstringop-overflow=4 -Wstrict-overflow=5 -Wundef -Wuninitialized -Wunused \ - -Wshadow \ + -Wstringop-overflow=4 -Wundef -Wuninitialized -Wunused -Wshadow \ -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 \ -Wno-format-nonliteral -Wno-strict-overflow -Wno-unused-but-set-variable \ - -Wno-type-limits -Wno-tautological-constant-out-of-range-compare \ - -Wvla \ + -Wno-type-limits -Wno-tautological-constant-out-of-range-compare -Wvla \ -D_GLIBCXX_ASSERTIONS \ -fsanitize=shift -fsanitize=integer-divide-by-zero \ -fsanitize=unreachable -fsanitize=vla-bound \