mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Fix non standards conforming prototypes. (#2150)
These now generate warnings with GCC 13
This commit is contained in:
+2
-2
@@ -359,7 +359,7 @@ static void cluster_dist_free_ht(zval *p) {
|
||||
}
|
||||
|
||||
/* Spin up a HashTable that will contain distribution lists */
|
||||
HashTable *cluster_dist_create() {
|
||||
HashTable *cluster_dist_create(void) {
|
||||
HashTable *ret;
|
||||
|
||||
ALLOC_HASHTABLE(ret);
|
||||
@@ -375,7 +375,7 @@ void cluster_dist_free(HashTable *ht) {
|
||||
}
|
||||
|
||||
/* Create a clusterDistList object */
|
||||
static clusterDistList *cluster_dl_create() {
|
||||
static clusterDistList *cluster_dl_create(void) {
|
||||
clusterDistList *dl;
|
||||
|
||||
dl = emalloc(sizeof(clusterDistList));
|
||||
|
||||
+2
-2
@@ -336,7 +336,7 @@ clusterReply *cluster_read_sock_resp(RedisSock *redis_sock,
|
||||
void cluster_free_reply(clusterReply *reply, int free_data);
|
||||
|
||||
/* Cluster distribution helpers for WATCH */
|
||||
HashTable *cluster_dist_create();
|
||||
HashTable *cluster_dist_create(void);
|
||||
void cluster_dist_free(HashTable *ht);
|
||||
int cluster_dist_add_key(redisCluster *c, HashTable *ht, char *key,
|
||||
size_t key_len, clusterKeyVal **kv);
|
||||
@@ -354,7 +354,7 @@ unsigned short cluster_hash_key_zval(zval *key);
|
||||
unsigned short cluster_hash_key(const char *key, int len);
|
||||
|
||||
/* Validate and sanitize cluster construction args */
|
||||
zend_string** cluster_validate_args(double timeout, double read_timeout,
|
||||
zend_string** cluster_validate_args(double timeout, double read_timeout,
|
||||
HashTable *seeds, uint32_t *nseeds, char **errstr);
|
||||
|
||||
void free_seed_array(zend_string **seeds, uint32_t nseeds);
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ redis_pool_free(redis_pool *pool) {
|
||||
}
|
||||
|
||||
/* Retreive session.gc_maxlifetime from php.ini protecting against an integer overflow */
|
||||
static int session_gc_maxlifetime() {
|
||||
static int session_gc_maxlifetime(void) {
|
||||
zend_long value = INI_INT("session.gc_maxlifetime");
|
||||
if (value > INT_MAX) {
|
||||
php_error_docref(NULL, E_NOTICE, "session.gc_maxlifetime overflows INT_MAX, truncating.");
|
||||
|
||||
Reference in New Issue
Block a user