From: Guy Harris Date: Fri, 3 Jul 2020 07:49:25 +0000 (-0700) Subject: OK, that provoked the warning; move it later. X-Git-Tag: libpcap-1.10-bp~83 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/eafe36a9a9116798a23a87a080a548dc2062ce37 OK, that provoked the warning; move it later. Move it just before the first DIAG_OFF_DEPRECATION, just in case that's messing up warnings. [skip ci] --- diff --git a/pcap-npf.c b/pcap-npf.c index e5dc489a..d16b09fb 100644 --- a/pcap-npf.c +++ b/pcap-npf.c @@ -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