Skip to content

Commit 1953052

Browse files
bugfix: fixed warning of signed and unsigned.
Signed-off-by: lijunlong <[email protected]>
1 parent 74786af commit 1953052

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/ngx_http_lua_headers.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,10 @@ ngx_http_lua_ngx_raw_header_cleanup(void *data)
12501250
int
12511251
ngx_http_lua_ffi_set_resp_header_macos(ngx_http_lua_set_resp_header_params_t *p)
12521252
{
1253-
return ngx_http_lua_ffi_set_resp_header(p->r, p->key_data, p->key_len,
1254-
p->is_nil, p->sval, p->sval_len,
1253+
return ngx_http_lua_ffi_set_resp_header(p->r, (const u_char *) p->key_data,
1254+
p->key_len, p->is_nil,
1255+
(const u_char *) p->sval,
1256+
p->sval_len,
12551257
p->mvals, p->mvals_len,
12561258
p->override, p->errmsg);
12571259
}

src/ngx_http_lua_shdict.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,8 @@ ngx_http_lua_ffi_shdict_free_space(ngx_shm_zone_t *zone)
20962096
int
20972097
ngx_http_lua_ffi_shdict_get_macos(ngx_http_lua_shdict_get_params_t *p)
20982098
{
2099-
return ngx_http_lua_ffi_shdict_get(p->zone, p->key, p->key_len,
2099+
return ngx_http_lua_ffi_shdict_get(p->zone,
2100+
(u_char *) p->key, p->key_len,
21002101
p->value_type, p->str_value_buf,
21012102
p->str_value_len, p->num_value,
21022103
p->user_flags, p->get_stale,
@@ -2107,8 +2108,10 @@ ngx_http_lua_ffi_shdict_get_macos(ngx_http_lua_shdict_get_params_t *p)
21072108
int
21082109
ngx_http_lua_ffi_shdict_store_macos(ngx_http_lua_shdict_store_params_t *p)
21092110
{
2110-
return ngx_http_lua_ffi_shdict_store(p->zone, p->op, p->key, p->key_len,
2111-
p->value_type, p->str_value_buf,
2111+
return ngx_http_lua_ffi_shdict_store(p->zone, p->op,
2112+
(u_char *) p->key, p->key_len,
2113+
p->value_type,
2114+
(u_char *) p->str_value_buf,
21122115
p->str_value_len, p->num_value,
21132116
p->exptime, p->user_flags,
21142117
p->errmsg, p->forcible);
@@ -2118,7 +2121,7 @@ ngx_http_lua_ffi_shdict_store_macos(ngx_http_lua_shdict_store_params_t *p)
21182121
int
21192122
ngx_http_lua_ffi_shdict_incr_macos(ngx_http_lua_shdict_incr_params_t *p)
21202123
{
2121-
return ngx_http_lua_ffi_shdict_incr(p->zone, p->key, p->key_len,
2124+
return ngx_http_lua_ffi_shdict_incr(p->zone, (u_char *) p->key, p->key_len,
21222125
p->num_value, p->errmsg,
21232126
p->has_init, p->init, p->init_ttl,
21242127
p->forcible);

0 commit comments

Comments
 (0)