mirror of
https://github.com/nginx/nginx.git
synced 2026-02-03 20:29:27 -05:00
Win32: fixed C4319 warning with MSVC 2022 x86.
Some checks failed
buildbot / buildbot (push) Has been cancelled
Some checks failed
buildbot / buildbot (push) Has been cancelled
The warning started to appear in Visual Studio 2022 version 17.14.21, which corresponds to the C/C++ compiler version 19.44.35221. The appropriate fix is to avoid mixing uint64_t and ngx_uint_t in an expression with bitwise operations. We can do that here because both the original shm->size value and the result of the expression are 32-bit platform words.
This commit is contained in:
parent
0609736a92
commit
6a67f71a4a
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ ngx_shm_alloc(ngx_shm_t *shm)
|
|||
shm->addr = MapViewOfFileEx(shm->handle, FILE_MAP_WRITE, 0, 0, 0, base);
|
||||
|
||||
if (shm->addr != NULL) {
|
||||
base += ngx_align(size, ngx_allocation_granularity);
|
||||
base += ngx_align(shm->size, ngx_allocation_granularity);
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue