summaryrefslogtreecommitdiff
path: root/src/sentinel.c
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2023-05-02 17:31:32 -0700
committerGitHub <noreply@github.com>2023-05-02 17:31:32 -0700
commit5e3be1be09c947810732e7be2a4bb1b0ed75de4a (patch)
tree821f53aaa761e676d5d3cb8ec556a61b39a2968c /src/sentinel.c
parent8163e816fe9b1ef7f1a904d862f6e2e24bc19713 (diff)
downloadredis-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/sentinel.c')
-rw-r--r--src/sentinel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sentinel.c b/src/sentinel.c
index 3d5c3861c..326def135 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -1740,7 +1740,7 @@ const char *sentinelCheckCreateInstanceErrors(int role) {
}
/* init function for server.sentinel_config */
-void initializeSentinelConfig() {
+void initializeSentinelConfig(void) {
server.sentinel_config = zmalloc(sizeof(struct sentinelConfig));
server.sentinel_config->monitor_cfg = listCreate();
server.sentinel_config->pre_monitor_cfg = listCreate();
@@ -1751,7 +1751,7 @@ void initializeSentinelConfig() {
}
/* destroy function for server.sentinel_config */
-void freeSentinelConfig() {
+void freeSentinelConfig(void) {
/* release these three config queues since we will not use it anymore */
listRelease(server.sentinel_config->pre_monitor_cfg);
listRelease(server.sentinel_config->monitor_cfg);
@@ -3179,7 +3179,7 @@ void sentinelSendPeriodicCommands(sentinelRedisInstance *ri) {
/* =========================== SENTINEL command ============================= */
-const char* getLogLevel() {
+const char* getLogLevel(void) {
switch (server.verbosity) {
case LL_DEBUG: return "debug";
case LL_VERBOSE: return "verbose";