From: Guy Harris Date: Fri, 3 Jul 2020 07:58:30 +0000 (-0700) Subject: That worked; move it after the warning-disabling-and-reenabling. X-Git-Tag: libpcap-1.10-bp~82 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/bd21dedefded205a2ebe8eb8ea42d00d7e4787b4 That worked; move it after the warning-disabling-and-reenabling. [skip ci] --- diff --git a/pcap-npf.c b/pcap-npf.c index d16b09fb..ea6b3f7e 100644 --- a/pcap-npf.c +++ b/pcap-npf.c @@ -1899,31 +1899,6 @@ 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 @@ -2082,6 +2057,31 @@ DIAG_ON_DEPRECATION } } +/* 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 ""; +} + /* * We can't use the same code that we use on UN*X, as that's doing * UN*X-specific calls.