diff options
author | David Robillard <d@drobilla.net> | 2020-07-21 20:20:07 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-21 20:20:07 +0200 |
commit | 920fb7ea26b1c00a6c023e18f184a9076f89e8ce (patch) | |
tree | 1fd50c6acc2c8a9e6034d93cddb64c31d892edc7 /src | |
parent | 8afee591f5a88888d896380e572182033901a7c4 (diff) | |
download | jalv-920fb7ea26b1c00a6c023e18f184a9076f89e8ce.tar.gz jalv-920fb7ea26b1c00a6c023e18f184a9076f89e8ce.tar.bz2 jalv-920fb7ea26b1c00a6c023e18f184a9076f89e8ce.zip |
Add format function annotations
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv_internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 3bfc102..0932460 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -58,6 +58,12 @@ # define REALTIME #endif +#ifdef __GNUC__ +# define JALV_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) +#else +# define JALV_LOG_FUNC(fmt, arg1) +#endif + #ifdef __cplusplus extern "C" { #endif @@ -526,11 +532,13 @@ jalv_strjoin(const char* a, const char* b) return out; } +JALV_LOG_FUNC(3, 4) int jalv_printf(LV2_Log_Handle handle, LV2_URID type, const char* fmt, ...); +JALV_LOG_FUNC(3, 0) int jalv_vprintf(LV2_Log_Handle handle, LV2_URID type, |