summaryrefslogtreecommitdiff
path: root/src/connection.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/connection.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/connection.c')
-rw-r--r--src/connection.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/connection.c b/src/connection.c
index 6bb0c9ec1..fd9d5d17a 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -57,7 +57,7 @@ int connTypeRegister(ConnectionType *ct) {
return C_OK;
}
-int connTypeInitialize() {
+int connTypeInitialize(void) {
/* currently socket connection type is necessary */
serverAssert(RedisRegisterConnectionTypeSocket() == C_OK);
@@ -88,7 +88,7 @@ ConnectionType *connectionByType(const char *typename) {
}
/* Cache TCP connection type, query it by string once */
-ConnectionType *connectionTypeTcp() {
+ConnectionType *connectionTypeTcp(void) {
static ConnectionType *ct_tcp = NULL;
if (ct_tcp != NULL)
@@ -101,7 +101,7 @@ ConnectionType *connectionTypeTcp() {
}
/* Cache TLS connection type, query it by string once */
-ConnectionType *connectionTypeTls() {
+ConnectionType *connectionTypeTls(void) {
static ConnectionType *ct_tls = NULL;
static int cached = 0;
@@ -116,7 +116,7 @@ ConnectionType *connectionTypeTls() {
}
/* Cache Unix connection type, query it by string once */
-ConnectionType *connectionTypeUnix() {
+ConnectionType *connectionTypeUnix(void) {
static ConnectionType *ct_unix = NULL;
if (ct_unix != NULL)
@@ -141,7 +141,7 @@ int connectionIndexByType(const char *typename) {
return -1;
}
-void connTypeCleanupAll() {
+void connTypeCleanupAll(void) {
ConnectionType *ct;
int type;