From 36bdf4c529cf89bfe54841e82c837503fd1065fe Mon Sep 17 00:00:00 2001 From: Martins Mozeiko Date: Sat, 28 Oct 2017 12:24:12 -0700 Subject: [PATCH] fix warning in VS2017 build --- build.cmd | 2 +- pkg2zip_zip.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.cmd b/build.cmd index b206389..949cf34 100644 --- a/build.cmd +++ b/build.cmd @@ -3,7 +3,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 cd "%~dp0" -set CL=/nologo /errorReport:none /Gm- /GF /GS- /MT /W4 /wd4324 +set CL=/nologo /errorReport:none /Gm- /GF /GS- /MT /W4 /WX /wd4324 set LINK=/errorReport:none /INCREMENTAL:NO set CL=%CL% /Ox diff --git a/pkg2zip_zip.c b/pkg2zip_zip.c index 5aaad4b..8b1de1c 100644 --- a/pkg2zip_zip.c +++ b/pkg2zip_zip.c @@ -287,7 +287,7 @@ void zip_close(zip* z) set16le(extra + 0, 1); // size of this "extra" block uint32_t extra_offset = 2 * sizeof(uint16_t); - set16le(extra + 2, extra_size - extra_offset); + set16le(extra + 2, (uint16_t)(extra_size - extra_offset)); if (size > 0xffffffff) { // original uncompressed file size