From: Paul Ramsey Date: Wed, 22 Jul 2015 12:35:40 +0000 (+0000) Subject: Quiet warnings: unsigned ints can't be negative X-Git-Tag: 2.2.0rc1~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2f4403eb53e6dd640c27dd4400bf2d6e5265c4b;p=postgis Quiet warnings: unsigned ints can't be negative git-svn-id: http://svn.osgeo.org/postgis/trunk@13822 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/loader/shpopen.c b/loader/shpopen.c index 444c07bc3..3db93e1bb 100644 --- a/loader/shpopen.c +++ b/loader/shpopen.c @@ -1702,8 +1702,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity ) if( bBigEndian ) SwapWord( 4, &nPoints ); if( bBigEndian ) SwapWord( 4, &nParts ); - if (nPoints < 0 || nParts < 0 || - nPoints > 50 * 1000 * 1000 || nParts > 10 * 1000 * 1000) + if (nPoints > 50 * 1000 * 1000 || nParts > 10 * 1000 * 1000) { snprintf(szErrorMsg, sizeof(szErrorMsg), "Corrupted .shp file : shape %d, nPoints=%d, nParts=%d.", @@ -1901,7 +1900,7 @@ SHPReadObject( SHPHandle psSHP, int hEntity ) if( bBigEndian ) SwapWord( 4, &nPoints ); - if (nPoints < 0 || nPoints > 50 * 1000 * 1000) + if (nPoints > 50 * 1000 * 1000) { snprintf(szErrorMsg, sizeof(szErrorMsg), "Corrupted .shp file : shape %d : nPoints = %d",