diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-11 05:21:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-11 05:21:08 +0200 |
commit | 90d184b234fbb72cb06636571655f30ba9858887 (patch) | |
tree | 034680b872e975805b46504278ea04008e403bea /src | |
parent | 5a037827f61a2e78f3863bc5a08f1535882d7f6a (diff) |
bus: decorate API calls with gcc attributes where appropriate
Diffstat (limited to 'src')
-rw-r--r-- | src/systemd/sd-bus.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 101e75131e..9268247729 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -39,6 +39,10 @@ extern "C" { # endif #endif +#ifndef _sd_sentinel_attr_ +# define _sd_sentinel_attr_ __attribute__((sentinel)) +#endif + /* Types */ typedef struct sd_bus sd_bus; @@ -137,7 +141,7 @@ int sd_bus_message_new_signal(sd_bus *bus, const char *path, const char *interfa int sd_bus_message_new_method_call(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message **m); int sd_bus_message_new_method_return(sd_bus *bus, sd_bus_message *call, sd_bus_message **m); int sd_bus_message_new_method_error(sd_bus *bus, sd_bus_message *call, const sd_bus_error *e, sd_bus_message **m); -int sd_bus_message_new_method_errorf(sd_bus *bus, sd_bus_message *call, sd_bus_message **m, const char *name, const char *format, ...); +int sd_bus_message_new_method_errorf(sd_bus *bus, sd_bus_message *call, sd_bus_message **m, const char *name, const char *format, ...) _sd_printf_attr_(5, 0); sd_bus_message* sd_bus_message_ref(sd_bus_message *m); sd_bus_message* sd_bus_message_unref(sd_bus_message *m); @@ -209,17 +213,17 @@ int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, int sd_bus_set_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *error, const char *type, ...); int sd_bus_reply_method_return(sd_bus *bus, sd_bus_message *call, const char *types, ...); int sd_bus_reply_method_error(sd_bus *bus, sd_bus_message *call, const sd_bus_error *e); -int sd_bus_reply_method_errorf(sd_bus *bus, sd_bus_message *call, const char *name, const char *format, ...); +int sd_bus_reply_method_errorf(sd_bus *bus, sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_attr_(4, 0); int sd_bus_emit_signal(sd_bus *bus, const char *path, const char *interface, const char *member, const char *types, ...); int sd_bus_emit_properties_changed_strv(sd_bus *bus, const char *path, const char *interface, char **names); -int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const char *interface, const char *name, ...); +int sd_bus_emit_properties_changed(sd_bus *bus, const char *path, const char *interface, const char *name, ...) _sd_sentinel_attr_; int sd_bus_emit_interfaces_added_strv(sd_bus *bus, const char *path, char **interfaces); /* MISSING */ -int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...); /* MISSING */ +int sd_bus_emit_interfaces_added(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_attr_; /* MISSING */ int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **interfaces); /* MISSING */ -int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const char *interface, ...); /* MISSING */ +int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_attr_; /* MISSING */ /* Bus management */ |