Skip to content

Commit 57c2e7d

Browse files
committed
fix incompatible types
1 parent be8ac4d commit 57c2e7d

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

cluster_library.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,7 +2182,7 @@ int mbulk_resp_loop_raw(RedisSock *redis_sock, zval *z_result,
21822182
long long count, void *ctx TSRMLS_DC)
21832183
{
21842184
char *line;
2185-
int line_len;
2185+
size_t line_len;
21862186

21872187
// Iterate over the number we have
21882188
while(count--) {
@@ -2203,7 +2203,7 @@ int mbulk_resp_loop(RedisSock *redis_sock, zval *z_result,
22032203
long long count, void *ctx TSRMLS_DC)
22042204
{
22052205
char *line;
2206-
int line_len;
2206+
size_t line_len;
22072207

22082208
/* Iterate over the lines we have to process */
22092209
while(count--) {
@@ -2232,7 +2232,8 @@ int mbulk_resp_loop_zipstr(RedisSock *redis_sock, zval *z_result,
22322232
long long count, void *ctx TSRMLS_DC)
22332233
{
22342234
char *line, *key;
2235-
int line_len, key_len;
2235+
size_t line_len;
2236+
int key_len;
22362237
long long idx=0;
22372238

22382239
// Our count wil need to be divisible by 2
@@ -2272,7 +2273,8 @@ int mbulk_resp_loop_zipdbl(RedisSock *redis_sock, zval *z_result,
22722273
long long count, void *ctx TSRMLS_DC)
22732274
{
22742275
char *line, *key;
2275-
int line_len, key_len;
2276+
size_t line_len;
2277+
int key_len;
22762278
long long idx=0;
22772279

22782280
// Our context will need to be divisible by 2
@@ -2313,7 +2315,8 @@ int mbulk_resp_loop_assoc(RedisSock *redis_sock, zval *z_result,
23132315
long long count, void *ctx TSRMLS_DC)
23142316
{
23152317
char *line;
2316-
int line_len,i=0;
2318+
size_t line_len;
2319+
int i=0;
23172320
zval **z_keys = ctx;
23182321

23192322
// Loop while we've got replies

library.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ extern zend_class_entry *spl_ce_RuntimeException;
4545
/* Helper to reselect the proper DB number when we reconnect */
4646
static int reselect_db(RedisSock *redis_sock TSRMLS_DC) {
4747
char *cmd, *response;
48-
int cmd_len, response_len;
48+
int cmd_len;
49+
size_t response_len;
4950

5051
cmd_len = redis_cmd_format_static(&cmd, "SELECT", "d", redis_sock->dbNumber);
5152

@@ -72,7 +73,8 @@ static int reselect_db(RedisSock *redis_sock TSRMLS_DC) {
7273
/* Helper to resend AUTH <password> in the case of a reconnect */
7374
static int resend_auth(RedisSock *redis_sock TSRMLS_DC) {
7475
char *cmd, *response;
75-
int cmd_len, response_len;
76+
int cmd_len;
77+
size_t response_len;
7678

7779
cmd_len = redis_cmd_format_static(&cmd, "AUTH", "s", redis_sock->auth,
7880
strlen(redis_sock->auth));
@@ -1010,7 +1012,7 @@ PHP_REDIS_API zval *redis_parse_info_response(char *response) {
10101012
*/
10111013
PHP_REDIS_API void redis_client_list_reply(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock, zval *z_tab) {
10121014
char *resp;
1013-
int resp_len;
1015+
size_t resp_len;
10141016
zval *z_ret;
10151017

10161018
/* Make sure we can read the bulk response from Redis */
@@ -1823,7 +1825,7 @@ redis_mbulk_reply_loop(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock,
18231825
zval *z_tab, int count, int unserialize)
18241826
{
18251827
char *line;
1826-
int len;
1828+
size_t len;
18271829

18281830
while(count > 0) {
18291831
line = redis_sock_read(redis_sock, &len TSRMLS_CC);

redis.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ static int send_discard_static(RedisSock *redis_sock TSRMLS_DC) {
387387

388388
int result = FAILURE;
389389
char *cmd, *resp;
390-
int resp_len, cmd_len;
390+
size_t resp_len;
391+
int cmd_len;
391392

392393
/* format our discard command */
393394
cmd_len = redis_cmd_format_static(&cmd, "DISCARD", "");
@@ -2182,7 +2183,8 @@ PHP_METHOD(Redis, multi)
21822183

21832184
RedisSock *redis_sock;
21842185
char *cmd;
2185-
int response_len, cmd_len;
2186+
size_t response_len;
2187+
int cmd_len;
21862188
char * response;
21872189
zval *object;
21882190
long multi_value = MULTI;
@@ -2425,7 +2427,8 @@ PHP_METHOD(Redis, exec)
24252427

24262428
PHP_REDIS_API int redis_response_enqueued(RedisSock *redis_sock TSRMLS_DC) {
24272429
char *resp;
2428-
int resp_len, ret = 0;
2430+
size_t resp_len;
2431+
int ret = 0;
24292432

24302433
if ((resp = redis_sock_read(redis_sock, &resp_len TSRMLS_CC)) == NULL) {
24312434
return 0;

redis_session.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ void
117117
redis_pool_member_auth(redis_pool_member *rpm TSRMLS_DC) {
118118
RedisSock *redis_sock = rpm->redis_sock;
119119
char *response, *cmd;
120-
int response_len, cmd_len;
120+
size_t response_len;
121+
int cmd_len;
121122

122123
if(!rpm->auth || !rpm->auth_len) { /* no password given. */
123124
return;
@@ -137,7 +138,8 @@ static void
137138
redis_pool_member_select(redis_pool_member *rpm TSRMLS_DC) {
138139
RedisSock *redis_sock = rpm->redis_sock;
139140
char *response, *cmd;
140-
int response_len, cmd_len;
141+
size_t response_len;
142+
int cmd_len;
141143

142144
cmd_len = redis_cmd_format_static(&cmd, "SELECT", "d", rpm->database);
143145

@@ -426,7 +428,8 @@ PS_WRITE_FUNC(redis)
426428
PS_DESTROY_FUNC(redis)
427429
{
428430
char *cmd, *response, *session;
429-
int cmd_len, response_len, session_len;
431+
int cmd_len, session_len;
432+
size_t response_len;
430433

431434
redis_pool *pool = PS_GET_MOD_DATA();
432435
redis_pool_member *rpm = redis_pool_get_sock(pool, key->val TSRMLS_CC);

0 commit comments

Comments
 (0)