Commit 706243a2 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

sd-daemon: add gcc format string attribute to sd_notifyf

parent 7d793605
......@@ -69,8 +69,6 @@
* docdir für sd-daemon.[ch]
* __attribute__ for sd_notifyf
* convenience library
Regularly:
......
......@@ -41,6 +41,12 @@ extern "C" {
* algorithms described here, if they do not want to include these two
* source files. */
#ifdef __GNUC__
#define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
#else
#define _sd_printf_attr_(a,b)
#endif
/*
Log levels for usage on stderr:
......@@ -170,7 +176,7 @@ int sd_notify(int unset_environment, const char *state);
* strerror(errno),
* errno);
*/
int sd_notifyf(int unset_environment, const char *format, ...);
int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(2,3);
#ifdef __cplusplus
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment