Quiet warnings: unsigned ints can't be negative

git-svn-id: http://svn.osgeo.org/postgis/trunk@13822 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Paul Ramsey 2015-07-22 12:35:40 +00:00
parent dda44b2964
commit e2f4403eb5

View file

@ -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",