From 03b1d6b74d13dd51a53d2531becb4137b96fa1ed Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Sun, 27 May 2012 09:39:31 +0000 Subject: A few things MSVC's analyzer found. --- zlib/minigzip.c | 5 +++++ zlib/trees.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'zlib') diff --git a/zlib/minigzip.c b/zlib/minigzip.c index 0a58a0a..7524afb 100644 --- a/zlib/minigzip.c +++ b/zlib/minigzip.c @@ -97,6 +97,7 @@ void error(msg) * Compress input to output then close both files. */ +#pragma warning(suppress: 6262) void gz_compress(in, out) FILE *in; gzFile out; @@ -119,6 +120,7 @@ void gz_compress(in, out) } if (len == 0) break; +#pragma warning(suppress: 6029) if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err)); } fclose(in); @@ -165,6 +167,7 @@ int gz_compress_mmap(in, out) /* =========================================================================== * Uncompress input to output then close both files. */ +#pragma warning(suppress: 6262) void gz_uncompress(in, out) gzFile in; FILE *out; @@ -298,7 +301,9 @@ int main(argc, argv) argc--, argv++; } if (argc == 0) { +#pragma warning(suppress: 6031) SET_BINARY_MODE(stdin); +#pragma warning(suppress: 6031) SET_BINARY_MODE(stdout); if (uncompr) { file = gzdopen(fileno(stdin), "rb"); diff --git a/zlib/trees.c b/zlib/trees.c index 26f3cf1..e968035 100644 --- a/zlib/trees.c +++ b/zlib/trees.c @@ -535,6 +535,7 @@ local void gen_bitlen(s, desc) /* Find the first bit length which could increase: */ do { bits = max_length-1; +#pragma warning(suppress: 6385) while (s->bl_count[bits] == 0) bits--; s->bl_count[bits]--; /* move one leaf down the tree */ s->bl_count[bits+1] += 2; /* move one overflow item as its brother */ @@ -551,6 +552,7 @@ local void gen_bitlen(s, desc) * from 'ar' written by Haruhiko Okumura.) */ for (bits = max_length; bits != 0; bits--) { +#pragma warning(suppress: 6385) n = s->bl_count[bits]; while (n != 0) { m = s->heap[--h]; -- cgit v1.1