From 44a6b1b68029833893f6e9cee35aa27a974038f6 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 2 May 2013 22:51:50 -0400 Subject: Add __attribute__((const, pure, format)) in various places I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls. --- src/login/logind-action.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/login/logind-action.h') diff --git a/src/login/logind-action.h b/src/login/logind-action.h index df080d98ed..552713637d 100644 --- a/src/login/logind-action.h +++ b/src/login/logind-action.h @@ -46,8 +46,8 @@ int manager_handle_action( bool ignore_inhibited, bool is_edge); -const char* handle_action_to_string(HandleAction h); -HandleAction handle_action_from_string(const char *s); +const char* handle_action_to_string(HandleAction h) _const_; +HandleAction handle_action_from_string(const char *s) _pure_; int config_parse_handle_action(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -- cgit v1.2.3-54-g00ecf