From: Uwe Hermann Date: Thu, 17 May 2018 20:50:45 +0000 (+0200) Subject: configure.ac: Add some more compiler warning options. X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff_plain;h=d652ef844d7af968c4b4fe76e477d3d1fed54138 configure.ac: Add some more compiler warning options. Add the -Wshadow -Wformat=2 -Wno-format-nonliteral -Wfloat-equal compiler options (supported by both gcc and clang) to get notified of more potential issues in the code. --- diff --git a/configure.ac b/configure.ac index 5593bc4..7b3fe16 100644 --- a/configure.ac +++ b/configure.ac @@ -119,7 +119,7 @@ SR_CHECK_COMPILE_FLAGS([SRD_EXTRA_CFLAGS], [C99], [-std=c99 -c99 -AC99 -qlanglvl SR_CHECK_COMPILE_FLAGS([SRD_EXTRA_CFLAGS], [visibility], [-fvisibility=hidden]) # Select suitable compiler warning flags. -SR_ARG_ENABLE_WARNINGS([SRD_WFLAGS], [-Wall], [-Wall -Wextra -Wmissing-prototypes]) +SR_ARG_ENABLE_WARNINGS([SRD_WFLAGS], [-Wall], [-Wall -Wextra -Wmissing-prototypes -Wshadow -Wformat=2 -Wno-format-nonliteral -Wfloat-equal]) # Link against libm, this is required (among other things) by Python. SRD_EXTRA_LIBS=