Skip to content

Commit d9c3235

Browse files
committed
build: Add -Wleading-whitespace=spaces compiler flag
1 parent cea1d00 commit d9c3235

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ else()
217217
try_append_c_flags(-Wcast-align=strict) # GCC >= 8.0.
218218
try_append_c_flags(-Wconditional-uninitialized) # Clang >= 3.0 only.
219219
try_append_c_flags(-Wextra) # GCC >= 3.4, this is the newer name of -W, which we don't use because older GCCs will warn about unused functions.
220+
try_append_c_flags(-Wleading-whitespace=spaces) # GCC >= 15.0
220221
try_append_c_flags(-Wnested-externs)
221222
try_append_c_flags(-Wno-long-long) # GCC >= 3.0, -Wlong-long is implied by -pedantic.
222223
try_append_c_flags(-Wno-overlength-strings) # GCC >= 4.2, -Woverlength-strings is implied by -pedantic.

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ AC_DEFUN([SECP_TRY_APPEND_DEFAULT_CFLAGS], [
112112
SECP_TRY_APPEND_CFLAGS([-Wconditional-uninitialized], $1) # Clang >= 3.0 only
113113
SECP_TRY_APPEND_CFLAGS([-Wreserved-identifier], $1) # Clang >= 13.0 only
114114
SECP_TRY_APPEND_CFLAGS([-Wtrailing-whitespace=any], $1) # GCC >= 15.0
115+
SECP_TRY_APPEND_CFLAGS([-Wleading-whitespace=spaces], $1) # GCC >= 15.0
115116
116117
CFLAGS="$SECP_TRY_APPEND_DEFAULT_CFLAGS_saved_CFLAGS"
117118
fi

0 commit comments

Comments
 (0)