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/functions.h | |
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/functions.h')
-rw-r--r-- | src/functions.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/functions.h b/src/functions.h index 40716dbc7..26e45babc 100644 --- a/src/functions.h +++ b/src/functions.h @@ -110,14 +110,14 @@ struct functionLibInfo { int functionsRegisterEngine(const char *engine_name, engine *engine_ctx); sds functionsCreateWithLibraryCtx(sds code, int replace, sds* err, functionsLibCtx *lib_ctx); -unsigned long functionsMemory(); -unsigned long functionsMemoryOverhead(); -unsigned long functionsNum(); -unsigned long functionsLibNum(); -dict* functionsLibGet(); +unsigned long functionsMemory(void); +unsigned long functionsMemoryOverhead(void); +unsigned long functionsNum(void); +unsigned long functionsLibNum(void); +dict* functionsLibGet(void); size_t functionsLibCtxfunctionsLen(functionsLibCtx *functions_ctx); -functionsLibCtx* functionsLibCtxGetCurrent(); -functionsLibCtx* functionsLibCtxCreate(); +functionsLibCtx* functionsLibCtxGetCurrent(void); +functionsLibCtx* functionsLibCtxCreate(void); void functionsLibCtxClearCurrent(int async); void functionsLibCtxFree(functionsLibCtx *lib_ctx); void functionsLibCtxClear(functionsLibCtx *lib_ctx); @@ -125,7 +125,7 @@ void functionsLibCtxSwapWithCurrent(functionsLibCtx *lib_ctx); int functionLibCreateFunction(sds name, void *function, functionLibInfo *li, sds desc, uint64_t f_flags, sds *err); -int luaEngineInitEngine(); -int functionsInit(); +int luaEngineInitEngine(void); +int functionsInit(void); #endif /* __FUNCTIONS_H_ */ |