libradiotap: fix bad format
authorRosen Penev <rosenp@gmail.com>
Mon, 31 Jan 2022 06:50:31 +0000 (22:50 -0800)
committerNick Hainke <vincent@systemli.org>
Wed, 2 Feb 2022 07:06:02 +0000 (08:06 +0100)
Found with -Wformat

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libradiotap/patches/010-format.patch [new file with mode: 0644]

diff --git a/libs/libradiotap/patches/010-format.patch b/libs/libradiotap/patches/010-format.patch
new file mode 100644 (file)
index 0000000..e90e04f
--- /dev/null
@@ -0,0 +1,16 @@
+--- a/parse.c
++++ b/parse.c
+@@ -1,3 +1,4 @@
++#include <inttypes.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+@@ -39,7 +40,7 @@ static void print_radiotap_namespace(str
+ {
+       switch (iter->this_arg_index) {
+       case IEEE80211_RADIOTAP_TSFT:
+-              printf("\tTSFT: %llu\n", le64toh(*(unsigned long long *)iter->this_arg));
++              printf("\tTSFT: %" PRIu64 "\n", le64toh(*(uint64_t *)iter->this_arg));
+               break;
+       case IEEE80211_RADIOTAP_FLAGS:
+               printf("\tflags: %02x\n", *iter->this_arg);