From: Robert Lipe Date: Thu, 2 Nov 2017 21:55:10 +0000 (-0500) Subject: Fix hyperactive warnings in new clang/gcc versions. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~115^2~1^2~228^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9eb27c2a713186140d1480f0ac39379c41aaf0b8;p=gpsbabel.git Fix hyperactive warnings in new clang/gcc versions. --- diff --git a/garmin_txt.cc b/garmin_txt.cc index 5a6f0128b..93e3f2b17 100644 --- a/garmin_txt.cc +++ b/garmin_txt.cc @@ -62,7 +62,7 @@ static time_t utc_offs = 0; // Having a Windows background, this software encodes degree marks in // Windows CP-1252. We don't attempt to handle all the subtleties of that, // but since we write degree marks and we know how they're encoded, use this. -static const int kDegreeSymbol = 0xB0; +static const char kDegreeSymbol = 0xB0; static gtxt_flags_t gtxt_flags; diff --git a/zlib/README.gpsbabel b/zlib/README.gpsbabel index 350f999a6..a9e511930 100644 --- a/zlib/README.gpsbabel +++ b/zlib/README.gpsbabel @@ -2,4 +2,5 @@ modified subset of zlib-1.2.8 from zlib.net. 1. zconf.h is modified to include our config.h 2. gzlib.c is modified to resolve a seek problem with uncompressed files on windows platforms build with mingw32 gcc. see gzlib.patch +3. inflatte.c: fix hyper Warning inflateMark() about shifting a negative number - shift, then negate instead. diff --git a/zlib/inflate.c b/zlib/inflate.c index 870f89bb4..777db29f2 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -1503,8 +1503,12 @@ long ZEXPORT inflateMark(strm) z_streamp strm; { struct inflate_state FAR *state; - - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; +// Begin GPSBabel +//Orig +// if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; +// Fix + if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16); +// End GPSBabel state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length :