]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Remove warning about -2147483648 (aka INT_MIN), causing this decimal constant...
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Sun, 2 Mar 2014 10:20:57 +0000 (10:20 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Sun, 2 Mar 2014 10:20:57 +0000 (10:20 +0000)
src/bin/jp2/convert.c

index ce7ecf2ebe6fc2000403827f4dd8d42c8d175dca..d0f73130ef0e91920bc345d6613b77a872aafeba 100644 (file)
@@ -1424,7 +1424,7 @@ static inline int clamp( const int value, const int prec, const int sgnd )
     {
     if (prec <= 8)       return CLAMP(value,-128,127);
     else if (prec <= 16) return CLAMP(value,-32768,32767);
-    else                 return CLAMP(value,-2147483648,2147483647);
+    else                 return CLAMP(value,-2147483647-1,2147483647);
     }
   else
     {