mirror of
https://github.com/mmozeiko/pkg2zip.git
synced 2026-09-02 19:23:09 +03:00
fixed minor warnings for msvc build
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
|
||||
|
||||
set CL=/nologo /errorReport:none /Gm- /GF /GS- /MT /W4
|
||||
set CL=/nologo /errorReport:none /Gm- /GF /GS- /MT /W4 /wd4324
|
||||
set LINK=/errorReport:none /INCREMENTAL:NO
|
||||
|
||||
set CL=%CL% /Ox
|
||||
|
||||
@@ -174,7 +174,7 @@ local int construct(struct huffman *h, const short *length, int n)
|
||||
*/
|
||||
for (symbol = 0; symbol < n; symbol++)
|
||||
if (length[symbol] != 0)
|
||||
h->symbol[offs[length[symbol]]++] = symbol;
|
||||
h->symbol[offs[length[symbol]]++] = (short)symbol;
|
||||
|
||||
/* return zero for complete set, positive for incomplete set */
|
||||
return left;
|
||||
@@ -212,7 +212,7 @@ local int codes(struct state *s,
|
||||
if (s->out != NIL) {
|
||||
if (s->outcnt == s->outlen)
|
||||
return 1;
|
||||
s->out[s->outcnt] = symbol;
|
||||
s->out[s->outcnt] = (unsigned char)symbol;
|
||||
}
|
||||
s->outcnt++;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ local int dynamic(struct state *s)
|
||||
|
||||
/* read code length code lengths (really), missing lengths are zero */
|
||||
for (index = 0; index < ncode; index++)
|
||||
lengths[order[index]] = bits(s, 3);
|
||||
lengths[order[index]] = (short)bits(s, 3);
|
||||
for (; index < 19; index++)
|
||||
lengths[order[index]] = 0;
|
||||
|
||||
@@ -344,7 +344,7 @@ local int dynamic(struct state *s)
|
||||
if (symbol < 0)
|
||||
return symbol; /* invalid symbol */
|
||||
if (symbol < 16) /* length in 0..15 */
|
||||
lengths[index++] = symbol;
|
||||
lengths[index++] = (short)symbol;
|
||||
else { /* repeat instruction */
|
||||
len = 0; /* assume repeating zeros */
|
||||
if (symbol == 16) { /* repeat last length 3..6 times */
|
||||
@@ -360,7 +360,7 @@ local int dynamic(struct state *s)
|
||||
if (index + symbol > nlen + ndist)
|
||||
return -6; /* too many lengths! */
|
||||
while (symbol--) /* repeat last or zero symbol times */
|
||||
lengths[index++] = len;
|
||||
lengths[index++] = (short)len;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user