mirror of
https://github.com/glennrp/libpng.git
synced 2026-10-22 20:29:09 +03:00
fix(build): Resolve MSVC warning for unary minus on unsigned type
Redo the refactor from commit 9929ba276e
(version 1.6.56) in a manner that placates MSVC warning C4146.
Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
committed by
Cosmin Truta
parent
d76d5106f0
commit
cf92470738
1
AUTHORS
1
AUTHORS
@@ -28,6 +28,7 @@ Authors, for copyright and licensing purposes.
|
||||
* Mans Rullgard
|
||||
* Matt Sarett
|
||||
* Mike Klein
|
||||
* Mike Williams
|
||||
* Mohammad Seet
|
||||
* Pascal Massimino
|
||||
* Paul Schmidt
|
||||
|
||||
@@ -4113,7 +4113,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
|
||||
row_stride = (png_int_32)/*SAFE*/png_row_stride;
|
||||
|
||||
if (row_stride < 0)
|
||||
check = -(png_uint_32)row_stride;
|
||||
check = 0U - (png_uint_32)row_stride;
|
||||
|
||||
else
|
||||
check = (png_uint_32)row_stride;
|
||||
|
||||
@@ -2030,7 +2030,7 @@ png_image_write_main(png_voidp argument)
|
||||
display->row_stride = (png_int_32)/*SAFE*/png_row_stride;
|
||||
|
||||
if (display->row_stride < 0)
|
||||
check = -(png_uint_32)display->row_stride;
|
||||
check = 0U - (png_uint_32)display->row_stride;
|
||||
|
||||
else
|
||||
check = (png_uint_32)display->row_stride;
|
||||
|
||||
Reference in New Issue
Block a user