]> The Tcpdump Group git mirrors - libpcap/commitdiff
Alas, there's no _U_ for MSVC, so suppress "unused parameter" warnings.
authorGuy Harris <[email protected]>
Tue, 20 Mar 2018 08:32:11 +0000 (01:32 -0700)
committerGuy Harris <[email protected]>
Tue, 20 Mar 2018 08:32:11 +0000 (01:32 -0700)
CMakeLists.txt

index bf15d788dacfc6e5707f37c254cc4998e437e0d4..294ae6ce065e72d02ad185e6bd240e26d0bc2a9b 100644 (file)
@@ -1570,6 +1570,17 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.devel)
         #
         # Disable some pointless warnings that /Wall turns on.
         #
         #
         # Disable some pointless warnings that /Wall turns on.
         #
+        # Unfortunately, MSVC does not appear to have an equivalent
+        # to "__attribute__((unused))" to mark a particular function
+        # parameter as being known to be unused, so that the compiler
+        # won't warn about it (for example, the function might have
+        # that parameter because a pointer to it is being used, and
+        # the signature of that function includes that parameter).
+        # C++ lets you give a parameter a type but no name, but C
+        # doesn't have that.
+        #
+        check_and_add_compiler_option(-wd4100)
+        #
         # We do *not* care whether some function is, or isn't, going to be
         # expanded inline.
         #
         # We do *not* care whether some function is, or isn't, going to be
         # expanded inline.
         #