]> sigrok.org Git - libsigrokdecode.git/commitdiff
configure.ac: Add some more compiler warning options.
authorUwe Hermann <redacted>
Thu, 17 May 2018 20:50:45 +0000 (22:50 +0200)
committerUwe Hermann <redacted>
Thu, 17 May 2018 21:00:43 +0000 (23:00 +0200)
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.

configure.ac

index 5593bc4db070f0be02a63b6c2483624401709cbf..7b3fe169118d983599e373672e0756e0f9f04ff0 100644 (file)
@@ -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=