mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
Configure: Added some -Wxxx checks when debug mode is enabled
We probably don't want our users to have to endure them, so they are enabled only when Debug is activated, because they tend to help keeping the code safe.
This commit is contained in:
committed by
Carlos R. Mafra
parent
1da498ff3b
commit
f2824647f3
16
configure.ac
16
configure.ac
@@ -89,6 +89,22 @@ AS_IF([test "x$debug" = "xyes"],
|
||||
|
||||
AX_CFLAGS_GCC_OPTION(-Wall)
|
||||
AX_CFLAGS_GCC_OPTION(-Wextra -Wno-sign-compare -Wno-unused-parameter)
|
||||
AS_IF([test "x$debug" = "xyes"],
|
||||
[dnl When debug is enabled, we try to activate more checks from
|
||||
dnl the compiler. They are on independant check because the
|
||||
dnl macro checks all the options at once, but we may have cases
|
||||
dnl where some options are not supported and we don't want to
|
||||
dnl loose all of them.
|
||||
dnl
|
||||
dnl Floating-point comparison is not a good idea
|
||||
AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
|
||||
dnl
|
||||
dnl Try to report misuses of '&' versus '&&' and similar
|
||||
AX_CFLAGS_GCC_OPTION([-Wlogical-op])
|
||||
dnl
|
||||
dnl Use of 'sizeof()' on inappropriate pointer types
|
||||
AX_CFLAGS_GCC_OPTION([-Wpointer-arith])
|
||||
])
|
||||
|
||||
dnl Platform-specific Makefile setup
|
||||
dnl ================================
|
||||
|
||||
Reference in New Issue
Block a user