diff options
author | michael-grunder <michael.grunder@gmail.com> | 2016-12-19 08:06:38 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2016-12-19 08:06:38 +0300 |
commit | d0b8011a9adcf2d0af2d7cead42c043b0d267d12 (patch) | |
tree | f9fda2cb15da5f2cc012b3a4ac646439c6138cde /cluster_library.c | |
parent | 6ef3057ed717966f0b182acc0e4a5fe449069eb8 (diff) |
Fix compiler warnings.
Changed zend hash function overrides to extern in the header, and
then defined them in library.c
Created a simple macro to suppress "set but not used" warnings,
which differ depending on build environment (php 5 vs php 7).
Diffstat (limited to 'cluster_library.c')
-rw-r--r-- | cluster_library.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cluster_library.c b/cluster_library.c index d85c654f..9ea41676 100644 --- a/cluster_library.c +++ b/cluster_library.c @@ -1678,7 +1678,7 @@ PHP_REDIS_API void cluster_sub_resp(INTERNAL_FUNCTION_PARAMETERS, redisCluster * /* Multibulk response, {[pattern], type, channel, payload} */ while(1) { /* Arguments */ - zval *z_type, *z_chan, *z_pat, *z_data; + zval *z_type, *z_chan, *z_pat=NULL, *z_data; int tab_idx=1, is_pmsg; // Get the next subscribe response @@ -2358,8 +2358,8 @@ int mbulk_resp_loop(RedisSock *redis_sock, zval *z_result, int mbulk_resp_loop_zipstr(RedisSock *redis_sock, zval *z_result, long long count, void *ctx TSRMLS_DC) { - char *line, *key; - int line_len, key_len; + char *line, *key = NULL; + int line_len, key_len=0; long long idx=0; // Our count wil need to be divisible by 2 @@ -2401,8 +2401,8 @@ int mbulk_resp_loop_zipstr(RedisSock *redis_sock, zval *z_result, int mbulk_resp_loop_zipdbl(RedisSock *redis_sock, zval *z_result, long long count, void *ctx TSRMLS_DC) { - char *line, *key; - int line_len, key_len; + char *line, *key=NULL; + int line_len, key_len=0; long long idx=0; // Our context will need to be divisible by 2 |