1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00

build: enable -Wlogical-op for GCC 4.4+

Closes #1941
This commit is contained in:
Viktor Szakats
2024-05-20 21:32:55 +02:00
parent c40bcbf8ae
commit 57e4316b68
2 changed files with 6 additions and 0 deletions

View File

@@ -478,6 +478,11 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
fi
dnl Only gcc 4.4 or later
if test "$compiler_num" -ge "404"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [logical-op])
fi
dnl Only gcc 4.5 or later
if test "$compiler_num" -ge "405"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])

View File

@@ -179,6 +179,7 @@ if(PICKY_COMPILER)
list(APPEND _picky_enable
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.1
-Wformat=2 # clang 3.0 gcc 4.8
-Wlogical-op # gcc 4.4
-Wtrampolines # gcc 4.6
)
endif()