]> The Tcpdump Group git mirrors - libpcap/commitdiff
OK, that provoked the warning; move it later.
authorGuy Harris <[email protected]>
Fri, 3 Jul 2020 07:49:25 +0000 (00:49 -0700)
committerGuy Harris <[email protected]>
Fri, 3 Jul 2020 07:49:25 +0000 (00:49 -0700)
Move it just before the first DIAG_OFF_DEPRECATION, just in case that's
messing up warnings.

[skip ci]

pcap-npf.c

index e5dc489a0f06362a9a6904bd4f6ea8977826e8e1..d16b09fb7fdbf63dec81b6a89053535d8c8faa68 100644 (file)
@@ -93,31 +93,6 @@ struct pcap_win {
 #endif
 };
 
-/* XXX - see if *this* gets a de-constification warning */
-
-extern const char *pcap_xyzzy_version(void);
-
-const char *
-pcap_xyzzy_version(void)
-{
-       /*
-        * Generate the version string.
-        */
-       char *packet_version_string = PacketGetVersion();
-       char *packet_LPCSTR = PacketGetLPCSTR();
-       char *packet_const_char_star = PacketGetConstCharStar();
-       char *full_pcap_version_string;
-
-       if (pcap_asprintf(&full_pcap_version_string,
-           "blah blah blah %s %s %s",
-           packet_version_string,
-           packet_LPCSTR, packet_const_char_star) != -1) {
-               /* Success */
-               return (full_pcap_version_string);
-       }
-       return "";
-}
-
 /*
  * Define stub versions of the monitor-mode support routines if this
  * isn't Npcap. HAVE_NPCAP_PACKET_API is defined by Npcap but not
@@ -1924,6 +1899,31 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
        return (ret);
 }
 
+/* XXX - see if *this* gets a de-constification warning */
+
+extern const char *pcap_xyzzy_version(void);
+
+const char *
+pcap_xyzzy_version(void)
+{
+       /*
+        * Generate the version string.
+        */
+       char *packet_version_string = PacketGetVersion();
+       char *packet_LPCSTR = PacketGetLPCSTR();
+       char *packet_const_char_star = PacketGetConstCharStar();
+       char *full_pcap_version_string;
+
+       if (pcap_asprintf(&full_pcap_version_string,
+           "blah blah blah %s %s %s",
+           packet_version_string,
+           packet_LPCSTR, packet_const_char_star) != -1) {
+               /* Success */
+               return (full_pcap_version_string);
+       }
+       return "";
+}
+
 /*
  * Return the name of a network interface attached to the system, or NULL
  * if none can be found.  The interface must be configured up; the