summaryrefslogtreecommitdiff
path: root/usbredirparser
diff options
context:
space:
mode:
authorFrediano Ziglio <freddy77@gmail.com>2021-02-22 09:43:03 +0000
committerFrediano Ziglio <freddy77@gmail.com>2021-06-05 21:27:48 +0100
commit9424f1f862276fc79d5c6f021203416c46fc2e41 (patch)
tree86b3c36eb92d82d9cce5c4b860e7d692d6f1914a /usbredirparser
parent01277c8cd150ffd76b807f50118ea7853df1dd49 (diff)
Fix formatting warnings using some MingW version
Using PRId64 formatting (or other 64 bit formats) can lead to bug as GCC is detecting some invalid match between string format and parameters. This is due to wrong format used. This is very similar to 249f42aaaf182cfd4f4b9120b2468ec8721bd890 (cfr "Fix mingw build with __MINGW_PRINTF_FORMAT"), fixing the same pattern. Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Diffstat (limited to 'usbredirparser')
-rw-r--r--usbredirparser/usbredirparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index c8710a1..b6d4740 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -84,7 +84,9 @@ struct usbredirparser_priv {
};
static void
-#if defined __GNUC__
+#if defined __MINGW_PRINTF_FORMAT
+__attribute__((format(__MINGW_PRINTF_FORMAT, 3, 4)))
+#elif defined __GNUC__
__attribute__((format(printf, 3, 4)))
#endif
va_log(struct usbredirparser_priv *parser, int verbose, const char *fmt, ...)