aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/perl/ngx_http_perl_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2013-09-04 21:16:59 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2013-09-04 21:16:59 +0400
commit2b0dba578fed500c1955979a8e281f4fad53bad9 (patch)
treee6f6e6e857fba187334f34036d6793ba8c2943ae /src/http/modules/perl/ngx_http_perl_module.c
parent5ab74625d6b28860a08d64ee808a62508a1491dc (diff)
downloadnginx-2b0dba578fed500c1955979a8e281f4fad53bad9.tar.gz
nginx-2b0dba578fed500c1955979a8e281f4fad53bad9.zip
Handling of ngx_int_t != intptr_t case.
Casts between pointers and integers produce warnings on size mismatch. To silence them, cast to (u)intptr_t should be used. Prevoiusly, casts to ngx_(u)int_t were used in some cases, and several ngx_int_t expressions had no casts. As of now it's mostly style as ngx_int_t is defined as intptr_t.
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r--src/http/modules/perl/ngx_http_perl_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index 90e32e80e..bf4d1fe9a 100644
--- a/src/http/modules/perl/ngx_http_perl_module.c
+++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -421,7 +421,7 @@ ngx_http_perl_ssi(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ssi_ctx,
return NGX_ERROR;
}
- asv[0] = (SV *) i;
+ asv[0] = (SV *) (uintptr_t) i;
for (i = 0; args[i]; i++) {
asv[i + 1] = newSVpvn((char *) args[i]->data, args[i]->len);
@@ -692,7 +692,7 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, HV *nginx, SV *sub,
if (args) {
EXTEND(sp, (intptr_t) args[0]);
- for (i = 1; i <= (ngx_uint_t) args[0]; i++) {
+ for (i = 1; i <= (uintptr_t) args[0]; i++) {
PUSHs(sv_2mortal(args[i]));
}
}