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/tls.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/tls.c')
-rw-r--r-- | src/tls.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1062,13 +1062,13 @@ static const char *connTLSGetType(connection *conn_) { return CONN_TYPE_TLS; } -static int tlsHasPendingData() { +static int tlsHasPendingData(void) { if (!pending_list) return 0; return listLength(pending_list) > 0; } -static int tlsProcessPendingData() { +static int tlsProcessPendingData(void) { listIter li; listNode *ln; @@ -1151,13 +1151,13 @@ static ConnectionType CT_TLS = { .get_peer_cert = connTLSGetPeerCert, }; -int RedisRegisterConnectionTypeTLS() { +int RedisRegisterConnectionTypeTLS(void) { return connTypeRegister(&CT_TLS); } #else /* USE_OPENSSL */ -int RedisRegisterConnectionTypeTLS() { +int RedisRegisterConnectionTypeTLS(void) { serverLog(LL_VERBOSE, "Connection type %s not builtin", CONN_TYPE_TLS); return C_ERR; } |