chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add printf attributes in exported headers
[elogind.git]
/
src
/
systemd
/
sd-bus.h
diff --git
a/src/systemd/sd-bus.h
b/src/systemd/sd-bus.h
index 36fab9ffa15c9125b61d4159518d02660e124803..55648e0b349f10eddc18398cb7560318a0a7c368 100644
(file)
--- a/
src/systemd/sd-bus.h
+++ b/
src/systemd/sd-bus.h
@@
-32,6
+32,14
@@
extern "C" {
#endif
extern "C" {
#endif
+#ifndef _sd_printf_attr_
+# if __GNUC__ >= 4
+# define _sd_printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
+# else
+# define _sd_printf_attr_(a,b)
+# endif
+#endif
+
/* TODO:
* - add page donation logic
* - api for appending/reading fixed arrays
/* TODO:
* - add page donation logic
* - api for appending/reading fixed arrays
@@
-187,7
+195,7
@@
int sd_bus_get_owner_machine_id(sd_bus *bus, const char *name, sd_id128_t *machi
#define SD_BUS_ERROR_MAKE(name, message) ((sd_bus_error) {(name), (message), 0})
void sd_bus_error_free(sd_bus_error *e);
#define SD_BUS_ERROR_MAKE(name, message) ((sd_bus_error) {(name), (message), 0})
void sd_bus_error_free(sd_bus_error *e);
-int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format, ...);
+int sd_bus_error_set(sd_bus_error *e, const char *name, const char *format, ...)
_sd_printf_attr_(3, 0)
;
void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char *message);
int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e);
int sd_bus_error_is_set(const sd_bus_error *e);
void sd_bus_error_set_const(sd_bus_error *e, const char *name, const char *message);
int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e);
int sd_bus_error_is_set(const sd_bus_error *e);