aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/portability.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 809f376c..a10213e5 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -11,8 +11,12 @@
#ifdef __GNUC__
#define noreturn __attribute__((noreturn))
+#if CFG_TOYBOX_DEBUG
#define printf_format __attribute__((format(printf, 1, 2)))
#else
+#define printf_format
+#endif
+#else
#define noreturn
#define printf_format
#endif