summaryrefslogtreecommitdiffstats
path: root/utils/lv2apply.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-15 17:24:02 +0200
committerDavid Robillard <d@drobilla.net>2020-07-16 23:37:49 +0200
commit9bf2b87029dda57fffca354162d58ee6a6db20e3 (patch)
tree305d6bc3012c1d39a780848ae65b83c7feeb85f7 /utils/lv2apply.c
parentf67eed15932940ef7953fbe3914a9cf1340329e4 (diff)
downloadlilv-9bf2b87029dda57fffca354162d58ee6a6db20e3.tar.gz
lilv-9bf2b87029dda57fffca354162d58ee6a6db20e3.tar.bz2
lilv-9bf2b87029dda57fffca354162d58ee6a6db20e3.zip
Annotate printf-style function
Diffstat (limited to 'utils/lv2apply.c')
-rw-r--r--utils/lv2apply.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/lv2apply.c b/utils/lv2apply.c
index b130c9f..0ef86df 100644
--- a/utils/lv2apply.c
+++ b/utils/lv2apply.c
@@ -27,6 +27,12 @@
#include <stdlib.h>
#include <string.h>
+#if defined(__GNUC__)
+# define LILV_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
+#else
+# define LILV_LOG_FUNC(fmt, arg1)
+#endif
+
/** Control port value set from the command line */
typedef struct Param {
const char* sym; ///< Port symbol
@@ -121,6 +127,7 @@ cleanup(int status, LV2Apply* self)
}
/** Print a fatal error and clean up for exit. */
+LILV_LOG_FUNC(3, 4)
static int
fatal(LV2Apply* self, int status, const char* fmt, ...)
{