aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-09-12 13:28:26 -0700
committerBrian Behlendorf <[email protected]>2019-09-12 13:28:26 -0700
commit74756182d2da0f8889b3a0a1fded274a2baa14f5 (patch)
tree37aa242f27bb1e97be087b48362abbfb69d16412 /lib/libspl
parentd66620681d85105256203b4f4407f0092e5a7fe7 (diff)
Enable compiler to typecheck logging
Annotate spa logging declarations with printflike Workaround gcc bug (non disable-able warning) by replacing "" with " " Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9316
Diffstat (limited to 'lib/libspl')
-rw-r--r--lib/libspl/include/sys/debug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libspl/include/sys/debug.h b/lib/libspl/include/sys/debug.h
index fde4a0120..c6a8c6784 100644
--- a/lib/libspl/include/sys/debug.h
+++ b/lib/libspl/include/sys/debug.h
@@ -29,4 +29,8 @@
#include <assert.h>
+#ifndef __printflike
+#define __printflike(x, y) __attribute__((__format__(__printf__, x, y)))
+#endif
+
#endif