diff options
author | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-10-01 09:44:28 +0300 |
---|---|---|
committer | Pavlo Yatsukhnenko <yatsukhnenko@gmail.com> | 2018-10-01 09:44:47 +0300 |
commit | bfa61700010ffe5d556c476de4ead0377e2183c0 (patch) | |
tree | 308eb9c141399429097ba5d9f4705a97f5b5fc42 | |
parent | bedf3e8f682c819a29d11c9c5cfc094b0c1676b9 (diff) |
Fix scan-build warnings
-rw-r--r-- | library.c | 2 | ||||
-rw-r--r-- | redis_commands.c | 4 | ||||
-rw-r--r-- | redis_session.c | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -1332,7 +1332,7 @@ redis_read_stream_messages_multi(RedisSock *redis_sock, int count, zval *z_strea { zval zv, *z_messages = &zv; int i, shdr, messages; - char *id; + char *id = NULL; int idlen; for (i = 0; i < count; i++) { diff --git a/redis_commands.c b/redis_commands.c index e9d26c3d..14fb56f2 100644 --- a/redis_commands.c +++ b/redis_commands.c @@ -2793,7 +2793,7 @@ int redis_georadius_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, char **cmd, int *cmd_len, short *slot, void **ctx) { char *key, *unit; - short store_slot; + short store_slot = 0; strlen_t keylen, unitlen; int argc = 5, keyfree; double lng, lat, radius; @@ -2864,7 +2864,7 @@ int redis_georadiusbymember_cmd(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_s { char *key, *mem, *unit; strlen_t keylen, memlen, unitlen; - short store_slot; + short store_slot = 0; int keyfree, argc = 4; double radius; geoOptions gopts = {0}; diff --git a/redis_session.c b/redis_session.c index 7f1a2656..51bebfd4 100644 --- a/redis_session.c +++ b/redis_session.c @@ -695,8 +695,8 @@ PS_UPDATE_TIMESTAMP_FUNC(redis) char *cmd, *response; int cmd_len, response_len; - const char *skey = ZSTR_VAL(key), *sval = ZSTR_VAL(val); - size_t skeylen = ZSTR_LEN(key), svallen = ZSTR_LEN(val); + const char *skey = ZSTR_VAL(key); + size_t skeylen = ZSTR_LEN(key); if (!skeylen) return FAILURE; |