@@ -165,7 +165,7 @@ ngx_http_array_split(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
165
165
166
166
target .data = value [3 ].data + sizeof ("to=" ) - 1 ;
167
167
target .len = value [3 ].len - (sizeof ("to=" ) - 1 );
168
- dd ("split target: %.*s" , target .len , target .data );
168
+ dd ("split target: %.*s" , ( int ) target .len , target .data );
169
169
170
170
if (cf -> args -> nelts > 3 + 1 ) {
171
171
bad_arg = & value [4 ];
@@ -327,7 +327,7 @@ ngx_http_array_map_op(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
327
327
328
328
target = value [2 ];
329
329
330
- dd ("array join target: %.*s" , target .len , target .data );
330
+ dd ("array join target: %.*s" , ( int ) target .len , target .data );
331
331
332
332
return ndk_set_var_multi_value_core (cf , & target , & value [1 ], & filter );
333
333
}
@@ -383,7 +383,7 @@ ngx_http_array_join(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
383
383
filter .size = 2 ;
384
384
target = value [2 ];
385
385
386
- dd ("array join target: %.*s" , target .len , target .data );
386
+ dd ("array join target: %.*s" , ( int ) target .len , target .data );
387
387
388
388
return ndk_set_var_multi_value_core (cf , & target , & value [1 ], & filter );
389
389
}
@@ -425,7 +425,7 @@ ngx_http_array_var_split(ngx_http_request_t *r, ngx_str_t *res,
425
425
ngx_http_array_split_data_t * conf = data ;
426
426
ngx_http_variable_value_t * sep , * str ;
427
427
ngx_str_t * s ;
428
- u_char * pos , * end , * last ;
428
+ u_char * pos , * end , * last = NULL ;
429
429
ssize_t max , i , len = 4 ;
430
430
ngx_array_t * array ;
431
431
@@ -493,7 +493,7 @@ ngx_http_array_var_split(ngx_http_request_t *r, ngx_str_t *res,
493
493
s -> data = pos ;
494
494
s -> len = last - pos ;
495
495
496
- dd ("split item %.*s" , s -> len , s -> data );
496
+ dd ("split item %.*s" , ( int ) s -> len , s -> data );
497
497
498
498
pos = last + sep -> len ;
499
499
i ++ ;
@@ -510,9 +510,9 @@ ngx_http_array_var_split(ngx_http_request_t *r, ngx_str_t *res,
510
510
s -> data = pos ;
511
511
s -> len = end - pos ;
512
512
513
- dd ("split item %.*s" , s -> len , s -> data );
513
+ dd ("split item %.*s" , ( int ) s -> len , s -> data );
514
514
515
- dd ("split: array size: %d" , array -> nelts );
515
+ dd ("split: array size: %d" , ( int ) array -> nelts );
516
516
dd ("split array ptr: %p" , array );
517
517
518
518
res -> data = (u_char * ) array ;
@@ -565,7 +565,7 @@ ngx_http_array_var_map(ngx_http_request_t *r, ngx_str_t *res,
565
565
}
566
566
}
567
567
568
- dd ("array var map: array size: %d" , array -> nelts );
568
+ dd ("array var map: array size: %d" , ( int ) array -> nelts );
569
569
570
570
array_it -> not_found = 0 ;
571
571
array_it -> valid = 1 ;
@@ -590,7 +590,8 @@ ngx_http_array_var_map(ngx_http_request_t *r, ngx_str_t *res,
590
590
return NGX_ERROR ;
591
591
}
592
592
593
- dd ("array var map: new item: %.*s" , new_value -> len , new_value -> data );
593
+ dd ("array var map: new item: %.*s" , (int ) new_value -> len ,
594
+ new_value -> data );
594
595
}
595
596
596
597
array_it -> not_found = 1 ;
@@ -706,7 +707,7 @@ ngx_http_array_var_join(ngx_http_request_t *r,
706
707
array = (ngx_array_t * ) v [1 ].data ;
707
708
708
709
dd ("join array ptr %p" , array );
709
- dd ("array->nelts: %d" , array -> nelts );
710
+ dd ("array->nelts: %d" , ( int ) array -> nelts );
710
711
711
712
if (array -> nelts == 0 ) {
712
713
res -> data = NULL ;
@@ -722,7 +723,7 @@ ngx_http_array_var_join(ngx_http_request_t *r,
722
723
len += value [i ].len ;
723
724
}
724
725
725
- dd ("buf len %d" , len );
726
+ dd ("buf len %d" , ( int ) len );
726
727
727
728
res -> data = ngx_palloc (r -> pool , len );
728
729
if (res -> data == NULL ) {
@@ -734,7 +735,7 @@ ngx_http_array_var_join(ngx_http_request_t *r,
734
735
p = res -> data ;
735
736
736
737
for (i = 0 ; i < array -> nelts ; i ++ ) {
737
- dd ("copying elem of size %d" , value [i ].len );
738
+ dd ("copying elem of size %d" , ( int ) value [i ].len );
738
739
p = ngx_copy (p , value [i ].data , value [i ].len );
739
740
if (i < array -> nelts - 1 ) {
740
741
p = ngx_copy (p , sep -> data , sep -> len );
0 commit comments