diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2023-11-20 17:21:48 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2023-11-20 18:36:08 +0100 |
commit | 9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7 (patch) | |
tree | 014d5a8d1de974ee2e07b9db67477df8d3a0adfb /src/userinfo.c | |
parent | 9cc4a6928da3931d0d7d6afad4489384cb21de23 (diff) | |
download | bindfs-9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7.tar.gz |
src|tests: Address warning -Wstrict-prototypes
Symptom with Clang 15:
> In file included from userinfo.c:20:
> ./userinfo.h:38:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> void invalidate_user_cache(); /* safe to call from signal handler */
> ^
> void
> [many more]
Diffstat (limited to 'src/userinfo.c')
-rw-r--r-- | src/userinfo.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/userinfo.c b/src/userinfo.c index a3ac91c..68291c1 100644 --- a/src/userinfo.c +++ b/src/userinfo.c @@ -52,13 +52,13 @@ static struct memory_block cache_memory_block = MEMORY_BLOCK_INITIALIZER; static volatile int cache_rebuild_requested = 1; -static void rebuild_cache(); +static void rebuild_cache(void); static struct uid_cache_entry *uid_cache_lookup(uid_t key); static struct gid_cache_entry *gid_cache_lookup(gid_t key); -static int rebuild_uid_cache(); -static int rebuild_gid_cache(); -static void clear_uid_cache(); -static void clear_gid_cache(); +static int rebuild_uid_cache(void); +static int rebuild_gid_cache(void); +static void clear_uid_cache(void); +static void clear_gid_cache(void); static int uid_cache_name_sortcmp(const void *key, const void *entry); static int uid_cache_name_searchcmp(const void *key, const void *entry); static int uid_cache_uid_sortcmp(const void *key, const void *entry); @@ -66,7 +66,7 @@ static int uid_cache_uid_searchcmp(const void *key, const void *entry); static int gid_cache_gid_sortcmp(const void *key, const void *entry); static int gid_cache_gid_searchcmp(const void *key, const void *entry); -static void rebuild_cache() +static void rebuild_cache(void) { free_memory_block(&cache_memory_block); init_memory_block(&cache_memory_block, 1024); @@ -98,7 +98,7 @@ static struct gid_cache_entry *gid_cache_lookup(gid_t key) ); } -static int rebuild_uid_cache() +static int rebuild_uid_cache(void) { /* We're holding the lock, so we have mutual exclusion on getpwent and getgrent too. */ struct passwd *pw; @@ -144,7 +144,7 @@ error: return 0; } -static int rebuild_gid_cache() +static int rebuild_gid_cache(void) { /* We're holding the lock, so we have mutual exclusion on getpwent and getgrent too. */ struct group *gr; @@ -205,12 +205,12 @@ error: return 0; } -static void clear_uid_cache() +static void clear_uid_cache(void) { uid_cache_size = 0; } -static void clear_gid_cache() +static void clear_gid_cache(void) { gid_cache_size = 0; } @@ -361,7 +361,7 @@ done: return ret; } -void invalidate_user_cache() +void invalidate_user_cache(void) { cache_rebuild_requested = 1; } |