From e2f4403eb53e6dd640c27dd4400bf2d6e5265c4b Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 22 Jul 2015 12:35:40 +0000 Subject: [PATCH] Quiet warnings: unsigned ints can't be negative git-svn-id: http://svn.osgeo.org/postgis/trunk@13822 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/shpopen.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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", -- 2.50.1