diff options
author | David Robillard <d@drobilla.net> | 2020-07-15 20:08:41 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-15 20:08:41 +0200 |
commit | 2f3ce76e9672ef7c21d6abe0baec18c626af539f (patch) | |
tree | a9894ff427225a11e70ab5810b01c5c639cdbb1f /tests/sratom_test.c | |
parent | 37976105b064cfca682b0a74ee99d42df734fcbc (diff) | |
download | sratom-2f3ce76e9672ef7c21d6abe0baec18c626af539f.tar.gz sratom-2f3ce76e9672ef7c21d6abe0baec18c626af539f.tar.bz2 sratom-2f3ce76e9672ef7c21d6abe0baec18c626af539f.zip |
Add printf format function annotation
Diffstat (limited to 'tests/sratom_test.c')
-rw-r--r-- | tests/sratom_test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/sratom_test.c b/tests/sratom_test.c index 1449774..4af757d 100644 --- a/tests/sratom_test.c +++ b/tests/sratom_test.c @@ -28,6 +28,12 @@ #define USTR(s) ((const uint8_t*)(s)) +#if defined(__GNUC__) +# define SRATOM_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) +#else +# define SRATOM_LOG_FUNC(fmt, arg1) +#endif + /// Simple O(n) URI map typedef struct { char** uris; @@ -71,6 +77,7 @@ urid_unmap(LV2_URID_Unmap_Handle handle, return NULL; } +SRATOM_LOG_FUNC(1, 2) static int test_fail(const char* fmt, ...) { |