Unverified Commit 5e3be1be authored by Madelyn Olson's avatar Madelyn Olson Committed by GitHub
Browse files

Remove prototypes with empty declarations (#12020)

Technically declaring a prototype with an empty declaration has been deprecated since the early days of C, but we never got a warning for it. C2x will apparently be introducing a breaking change if you are using this type of declarator, so Clang 15 has started issuing a warning with -pedantic. Although not apparently a problem for any of the compiler we build on, if feels like the right thing is to properly adhere to the C standard and use (void).
parent 8163e816
......@@ -656,7 +656,7 @@ void set_jemalloc_bg_thread(int enable) {
je_mallctl("background_thread", NULL, 0, &val, 1);
}
int jemalloc_purge() {
int jemalloc_purge(void) {
/* return all unused (reserved) pages to the OS */
char tmp[32];
unsigned narenas = 0;
......@@ -682,7 +682,7 @@ void set_jemalloc_bg_thread(int enable) {
((void)(enable));
}
int jemalloc_purge() {
int jemalloc_purge(void) {
return 0;
}
......
......@@ -120,7 +120,7 @@ void zmalloc_set_oom_handler(void (*oom_handler)(size_t));
size_t zmalloc_get_rss(void);
int zmalloc_get_allocator_info(size_t *allocated, size_t *active, size_t *resident);
void set_jemalloc_bg_thread(int enable);
int jemalloc_purge();
int jemalloc_purge(void);
size_t zmalloc_get_private_dirty(long pid);
size_t zmalloc_get_smap_bytes_by_field(char *field, long pid);
size_t zmalloc_get_memory_size(void);
......
......@@ -21,7 +21,7 @@ typedef struct {
static RedisModuleType *fsltype = NULL;
fsl_t *fsl_type_create() {
fsl_t *fsl_type_create(void) {
fsl_t *o;
o = RedisModule_Alloc(sizeof(*o));
o->length = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment