Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3ce048

Browse files
Fix non standards conforming prototypes. (#2150)
These now generate warnings with GCC 13
1 parent 0f502c9 commit b3ce048

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

cluster_library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static void cluster_dist_free_ht(zval *p) {
359359
}
360360

361361
/* Spin up a HashTable that will contain distribution lists */
362-
HashTable *cluster_dist_create() {
362+
HashTable *cluster_dist_create(void) {
363363
HashTable *ret;
364364

365365
ALLOC_HASHTABLE(ret);
@@ -375,7 +375,7 @@ void cluster_dist_free(HashTable *ht) {
375375
}
376376

377377
/* Create a clusterDistList object */
378-
static clusterDistList *cluster_dl_create() {
378+
static clusterDistList *cluster_dl_create(void) {
379379
clusterDistList *dl;
380380

381381
dl = emalloc(sizeof(clusterDistList));

cluster_library.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ clusterReply *cluster_read_sock_resp(RedisSock *redis_sock,
336336
void cluster_free_reply(clusterReply *reply, int free_data);
337337

338338
/* Cluster distribution helpers for WATCH */
339-
HashTable *cluster_dist_create();
339+
HashTable *cluster_dist_create(void);
340340
void cluster_dist_free(HashTable *ht);
341341
int cluster_dist_add_key(redisCluster *c, HashTable *ht, char *key,
342342
size_t key_len, clusterKeyVal **kv);
@@ -354,7 +354,7 @@ unsigned short cluster_hash_key_zval(zval *key);
354354
unsigned short cluster_hash_key(const char *key, int len);
355355

356356
/* Validate and sanitize cluster construction args */
357-
zend_string** cluster_validate_args(double timeout, double read_timeout,
357+
zend_string** cluster_validate_args(double timeout, double read_timeout,
358358
HashTable *seeds, uint32_t *nseeds, char **errstr);
359359

360360
void free_seed_array(zend_string **seeds, uint32_t nseeds);

redis_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ redis_pool_free(redis_pool *pool) {
129129
}
130130

131131
/* Retreive session.gc_maxlifetime from php.ini protecting against an integer overflow */
132-
static int session_gc_maxlifetime() {
132+
static int session_gc_maxlifetime(void) {
133133
zend_long value = INI_INT("session.gc_maxlifetime");
134134
if (value > INT_MAX) {
135135
php_error_docref(NULL, E_NOTICE, "session.gc_maxlifetime overflows INT_MAX, truncating.");

0 commit comments

Comments
 (0)