]> The Tcpdump Group git mirrors - libpcap/commit
Squelch -Wformat-nonliteral in pcap_vasprintf().
authorDenis Ovsienko <[email protected]>
Sun, 19 Feb 2023 22:03:08 +0000 (22:03 +0000)
committerDenis Ovsienko <[email protected]>
Sun, 19 Feb 2023 22:03:08 +0000 (22:03 +0000)
commit31bb18a1d5d8d587df9975dc87e6d45d7694e61e
treee9806e67d54578eaf4b1374d144f9837e5649931
parent2f45949a459252ac5abfbbc75ad58d7e3c3d559c
Squelch -Wformat-nonliteral in pcap_vasprintf().

On FreeBSD 13.1/AArch64 with Clang 13.0.0 "make asprintf.o" produced two
warnings:

./missing/asprintf.c:64:36: warning: format string is not a string
  literal [-Wformat-nonliteral]
        len = vsnprintf(&buf, sizeof buf, format, args);
                                          ^~~~~~
./missing/asprintf.c:75:33: warning: format string is not a string
  literal [-Wformat-nonliteral]
        ret = vsnprintf(str, str_size, format, args);
                                       ^~~~~~

Add printf()-related attributes to the prototype, as is already done for
pcap_asprintf().
portability.h