Skip to content

Commit

Permalink
misc(*) fix log format specifier of 'ssize_t' arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Jun 20, 2024
1 parent 1b9f7ca commit 7dcd7a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common/ngx_wasm_socket_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ ngx_wasm_socket_read_http_response(ngx_wasm_socket_tcp_t *sock,
if (bytes) {
ngx_log_debug1(NGX_LOG_DEBUG_WASM, sock->log, 0,
"wasm tcp socket resuming http response reading "
"with %d bytes to parse", bytes);
"with %z bytes to parse", bytes);

return ngx_wasm_read_http_response(&sock->buffer, sock->buf_in, bytes,
(ngx_wasm_http_reader_ctx_t *) ctx);
Expand Down
8 changes: 4 additions & 4 deletions src/wasm/ngx_wasm_directives.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ validate_shm_size(ngx_conf_t *cf, ssize_t size, ngx_str_t *value)

if (size < (ssize_t) NGX_WASM_SHM_MIN_SIZE) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"[wasm] shm size of %d bytes is too small, "
"minimum required is %d bytes",
"[wasm] shm size of %z bytes is too small, "
"minimum required is %z bytes",
size, NGX_WASM_SHM_MIN_SIZE);
return NGX_ERROR;
}

if ((size & (ngx_pagesize - 1)) != 0) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"[wasm] shm size of %d bytes is not page-aligned, "
"must be a multiple of %d", size, ngx_pagesize);
"[wasm] shm size of %z bytes is not page-aligned, "
"must be a multiple of %z", size, ngx_pagesize);
return NGX_ERROR;
}

Expand Down
4 changes: 2 additions & 2 deletions src/wasm/ngx_wasm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ ngx_wasm_bytes_from_path(wasm_byte_vec_t *out, u_char *path, ngx_log_t *log)
if (n != fsize) {
ngx_wasm_log_error(NGX_LOG_EMERG, log, 0,
ngx_read_file_n " \"%V\" returned only "
"%z file_bytes instead of %uiz", &file.name,
n, fsize);
"%z file_bytes instead of %z",
&file.name, n, fsize);
goto close;
}

Expand Down

0 comments on commit 7dcd7a3

Please sign in to comment.