Skip to content

Commit

Permalink
Fix scan-build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yatsukhnenko committed Oct 1, 2018
1 parent bedf3e8 commit bfa6170
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down
4 changes: 2 additions & 2 deletions redis_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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};
Expand Down
4 changes: 2 additions & 2 deletions redis_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bfa6170

Please sign in to comment.