Skip to content

Commit fe4ba10

Browse files
authored
Merge pull request phpredis#1438 from remicollet/issue-ww
build warnings
2 parents dad0a4d + 5102704 commit fe4ba10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,10 +2113,13 @@ PHP_REDIS_API void redis_free_socket(RedisSock *redis_sock)
21132113
PHP_REDIS_API int
21142114
redis_pack(RedisSock *redis_sock, zval *z, char **val, strlen_t *val_len TSRMLS_DC)
21152115
{
2116-
char *buf, *data;
2116+
char *buf;
21172117
int valfree;
21182118
strlen_t len;
2119+
#ifdef HAVE_REDIS_LZF
2120+
char *data;
21192121
uint32_t res;
2122+
#endif
21202123

21212124
valfree = redis_serialize(redis_sock, z, &buf, &len TSRMLS_CC);
21222125
switch (redis_sock->compression) {
@@ -2142,9 +2145,11 @@ redis_pack(RedisSock *redis_sock, zval *z, char **val, strlen_t *val_len TSRMLS_
21422145
PHP_REDIS_API int
21432146
redis_unpack(RedisSock *redis_sock, const char *val, int val_len, zval *z_ret TSRMLS_DC)
21442147
{
2148+
#ifdef HAVE_REDIS_LZF
21452149
char *data;
21462150
int i;
21472151
uint32_t res;
2152+
#endif
21482153

21492154
switch (redis_sock->compression) {
21502155
case REDIS_COMPRESSION_LZF:

0 commit comments

Comments
 (0)