diff options
author | Colin Watson <cjwatson@debian.org> | 2019-08-25 17:04:24 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-08-25 17:04:24 +0100 |
commit | 7a1713f45eb35d06ddf20f56f6d8ecc564c0471f (patch) | |
tree | 17a4a32f8c6870399e301a8b38b2de256cd63ff4 /lib/glcontainers.c | |
parent | 6163f5ce6c220d3fbde260726d5560cbc8ecb260 (diff) |
Add several function attributes suggested by GCC
* lib/debug.c (vdebug): Mark first argument as a printf format string.
* lib/encodings.c (get_page_encoding): Mark as malloc-like.
(is_roff_device, get_output_encoding, get_less_charset,
get_jless_charset): Mark as pure.
* lib/glcontainers.c (string_equals, string_hash): Mark as pure.
* lib/security.c (running_setuid): Mark as pure.
* lib/util.c (trim_spaces): Mark as malloc-like.
* libdb/db_lookup.c (dash_if_unset): Mark as const.
* libdb/db_store.c (compare_ids): Mark as const.
* src/whatis.c (match): Mark as pure.
Diffstat (limited to 'lib/glcontainers.c')
-rw-r--r-- | lib/glcontainers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/glcontainers.c b/lib/glcontainers.c index 732cbe42..cbd635cf 100644 --- a/lib/glcontainers.c +++ b/lib/glcontainers.c @@ -37,12 +37,12 @@ #include "glcontainers.h" -bool string_equals (const void *s1, const void *s2) +bool _GL_ATTRIBUTE_PURE string_equals (const void *s1, const void *s2) { return STREQ ((const char *) s1, (const char *) s2); } -size_t string_hash (const void *s) +size_t _GL_ATTRIBUTE_PURE string_hash (const void *s) { return hash_pjw_bare (s, strlen ((const char *) s)); } |