diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-29 17:15:28 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-10-13 16:45:23 -0700 |
commit | 0fca6e570802d18d0f4ef073ad8d90ad5522b4f0 (patch) | |
tree | ab25951ed44b6bdaf321fb50b1d2b873ada95c44 | |
parent | 1ba54b05a4a23d1acd85b5c14384ac8cbaed8478 (diff) | |
download | memcached-0fca6e570802d18d0f4ef073ad8d90ad5522b4f0.tar.gz |
Fix function protypes for clang errors
clang-15+ has started diagnosing them as errors
thread.c:925:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
| void STATS_UNLOCK() {
| ^
| void
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | assoc.c | 4 | ||||
-rw-r--r-- | memcached.c | 4 | ||||
-rw-r--r-- | slabs.c | 2 | ||||
-rw-r--r-- | testapp.c | 2 | ||||
-rw-r--r-- | thread.c | 4 |
5 files changed, 8 insertions, 8 deletions
@@ -261,7 +261,7 @@ static void *assoc_maintenance_thread(void *arg) { static pthread_t maintenance_tid; -int start_assoc_maintenance_thread() { +int start_assoc_maintenance_thread(void) { int ret; char *env = getenv("MEMCACHED_HASH_BULK_MOVE"); if (env != NULL) { @@ -279,7 +279,7 @@ int start_assoc_maintenance_thread() { return 0; } -void stop_assoc_maintenance_thread() { +void stop_assoc_maintenance_thread(void) { mutex_lock(&maintenance_lock); do_run_maintenance_thread = 0; pthread_cond_signal(&maintenance_cond); diff --git a/memcached.c b/memcached.c index 86ac064..2806afb 100644 --- a/memcached.c +++ b/memcached.c @@ -84,7 +84,7 @@ static int try_read_command_udp(conn *c); static enum try_read_result try_read_network(conn *c); static enum try_read_result try_read_udp(conn *c); -static int start_conn_timeout_thread(); +static int start_conn_timeout_thread(void); /* stats */ static void stats_init(void); @@ -374,7 +374,7 @@ static void *conn_timeout_thread(void *arg) { return NULL; } -static int start_conn_timeout_thread() { +static int start_conn_timeout_thread(void) { int ret; if (settings.idle_timeout == 0) @@ -638,7 +638,7 @@ static void *memory_allocate(size_t size) { } /* Must only be used if all pages are item_size_max */ -static void memory_release() { +static void memory_release(void) { void *p = NULL; if (mem_base != NULL) return; @@ -80,7 +80,7 @@ static struct conn *con = NULL; static bool allow_closed_read = false; static bool enable_ssl = false; -static void close_conn() { +static void close_conn(void) { if (con == NULL) return; #ifdef TLS if (con->ssl) { @@ -918,11 +918,11 @@ enum store_item_type store_item(item *item, int comm, conn* c) { /******************************* GLOBAL STATS ******************************/ -void STATS_LOCK() { +void STATS_LOCK(void) { pthread_mutex_lock(&stats_lock); } -void STATS_UNLOCK() { +void STATS_UNLOCK(void) { pthread_mutex_unlock(&stats_lock); } |