summaryrefslogtreecommitdiff
path: root/src/redis-benchmark.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/redis-benchmark.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/redis-benchmark.c')
-rw-r--r--src/redis-benchmark.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index 95f54539c..2eb689e9f 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -192,7 +192,7 @@ static void writeHandler(aeEventLoop *el, int fd, void *privdata, int mask);
static void createMissingClients(client c);
static benchmarkThread *createBenchmarkThread(int index);
static void freeBenchmarkThread(benchmarkThread *thread);
-static void freeBenchmarkThreads();
+static void freeBenchmarkThreads(void);
static void *execBenchmarkThread(void *ptr);
static clusterNode *createClusterNode(char *ip, int port);
static redisConfig *getRedisConfig(const char *ip, int port,
@@ -201,7 +201,7 @@ static redisContext *getRedisContext(const char *ip, int port,
const char *hostsocket);
static void freeRedisConfig(redisConfig *cfg);
static int fetchClusterSlotsConfiguration(client c);
-static void updateClusterSlotsConfiguration();
+static void updateClusterSlotsConfiguration(void);
int showThroughput(struct aeEventLoop *eventLoop, long long id,
void *clientData);
@@ -958,7 +958,7 @@ static void showLatencyReport(void) {
}
}
-static void initBenchmarkThreads() {
+static void initBenchmarkThreads(void) {
int i;
if (config.threads) freeBenchmarkThreads();
config.threads = zmalloc(config.num_threads * sizeof(benchmarkThread*));
@@ -968,7 +968,7 @@ static void initBenchmarkThreads() {
}
}
-static void startBenchmarkThreads() {
+static void startBenchmarkThreads(void) {
int i;
for (i = 0; i < config.num_threads; i++) {
benchmarkThread *t = config.threads[i];
@@ -1035,7 +1035,7 @@ static void freeBenchmarkThread(benchmarkThread *thread) {
zfree(thread);
}
-static void freeBenchmarkThreads() {
+static void freeBenchmarkThreads(void) {
int i = 0;
for (; i < config.num_threads; i++) {
benchmarkThread *thread = config.threads[i];
@@ -1096,7 +1096,7 @@ static void freeClusterNode(clusterNode *node) {
zfree(node);
}
-static void freeClusterNodes() {
+static void freeClusterNodes(void) {
int i = 0;
for (; i < config.cluster_node_count; i++) {
clusterNode *n = config.cluster_nodes[i];
@@ -1118,7 +1118,7 @@ static clusterNode **addClusterNode(clusterNode *node) {
/* TODO: This should be refactored to use CLUSTER SLOTS, the migrating/importing
* information is anyway not used.
*/
-static int fetchClusterConfiguration() {
+static int fetchClusterConfiguration(void) {
int success = 1;
redisContext *ctx = NULL;
redisReply *reply = NULL;
@@ -1377,7 +1377,7 @@ cleanup:
}
/* Atomically update the new slots configuration. */
-static void updateClusterSlotsConfiguration() {
+static void updateClusterSlotsConfiguration(void) {
pthread_mutex_lock(&config.is_updating_slots_mutex);
atomicSet(config.is_updating_slots, 1);
int i;