diff options
author | Madelyn Olson <34459052+madolson@users.noreply.github.com> | 2023-05-02 17:31:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 17:31:32 -0700 |
commit | 5e3be1be09c947810732e7be2a4bb1b0ed75de4a (patch) | |
tree | 821f53aaa761e676d5d3cb8ec556a61b39a2968c /src/listpack.c | |
parent | 8163e816fe9b1ef7f1a904d862f6e2e24bc19713 (diff) | |
download | redis-5e3be1be09c947810732e7be2a4bb1b0ed75de4a.tar.gz |
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).
Diffstat (limited to 'src/listpack.c')
-rw-r--r-- | src/listpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listpack.c b/src/listpack.c index f7c867f2e..ecc7e9f6f 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -1693,7 +1693,7 @@ char *mixlist[] = {"hello", "foo", "quux", "1024"}; char *intlist[] = {"4294967296", "-100", "100", "128000", "non integer", "much much longer non integer"}; -static unsigned char *createList() { +static unsigned char *createList(void) { unsigned char *lp = lpNew(0); lp = lpAppend(lp, (unsigned char*)mixlist[1], strlen(mixlist[1])); lp = lpAppend(lp, (unsigned char*)mixlist[2], strlen(mixlist[2])); @@ -1702,7 +1702,7 @@ static unsigned char *createList() { return lp; } -static unsigned char *createIntList() { +static unsigned char *createIntList(void) { unsigned char *lp = lpNew(0); lp = lpAppend(lp, (unsigned char*)intlist[2], strlen(intlist[2])); lp = lpAppend(lp, (unsigned char*)intlist[3], strlen(intlist[3])); |