]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
build: Wimplicit-int-float-conversion checked with --enable-warnings 11524/head
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 17 Jul 2024 09:26:46 +0000 (11:26 +0200)
committerPhilippe Antoine <pantoine@oisf.net>
Fri, 19 Jul 2024 08:12:32 +0000 (10:12 +0200)
When configure is used with --enable-warnings, we try to add most
warning flags that should pass.
This commits adds the warning Wimplicit-int-float-conversion

configure.ac

index 433ed5459004a4812446672405b9fa958d33dde1..15437be568dacdf4f282182077e47763e645a3a1 100644 (file)
@@ -2302,6 +2302,15 @@ fi
                 AC_MSG_RESULT([yes]),
                 [AC_MSG_RESULT([no])
                 CFLAGS="$OCFLAGS"])
+        # check if our compiler supports -Wimplicit-int-float-conversion
+        AC_MSG_CHECKING(for -Wimplicit-int-float-conversion)
+        OCFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Wimplicit-int-float-conversion"
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
+                    [[]])],
+                AC_MSG_RESULT([yes]),
+                [AC_MSG_RESULT([no])
+                CFLAGS="$OCFLAGS"])
     ])
 
     AC_CHECK_LIB(fuzzpcap, FPC_IsFuzzPacketCapture, HAS_FUZZPCAP="yes")