if 0 likely out of bounds write, we only have one scratch channel, don't write to a second if asked to do stereo (thanks, GCC 4.5.3!) convert lowercase min, max to uppercase - libstdc++6 doesn't approve of it. mostly using sed, because there's too many occurences. if we're not returning anything, use a void return type. fix likely issue with signed char - 0251 may be truncated, but the equivalent \xa9 won't be. don't store a return value if we're not going to check it. correct misleading indentation. Remove -fpermissive too, as it caused jperkin issues. I could build without removing -Werror, but I'll keep it since it's full of warnings. XXX do we want a security advisory for this, if it can be triggered?
23 lines
763 B
C++
23 lines
763 B
C++
$NetBSD: patch-common_video_iso-mpeg4_include_basic.hpp,v 1.1 2017/05/06 18:12:00 maya Exp $
|
|
|
|
libstdc++6 disapproves of lowercase min,max macros
|
|
use uppercase.
|
|
|
|
--- common/video/iso-mpeg4/include/basic.hpp.orig 2005-05-09 21:29:45.000000000 +0000
|
|
+++ common/video/iso-mpeg4/include/basic.hpp
|
|
@@ -89,11 +89,11 @@ Revision History:
|
|
#define transpPixel CPixel(0,0,0,0)
|
|
#define opaquePixel CPixel(255,255,255,255)
|
|
|
|
-#ifndef max
|
|
-#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
+#ifndef MAX
|
|
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
#endif
|
|
-#ifndef min
|
|
-#define min(a, b) (((a) < (b)) ? (a) : (b))
|
|
+#ifndef MIN
|
|
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
#endif
|
|
#define signOf(x) (((x) > 0) ? 1 : 0)
|
|
#define invSignOf(x) ((x) > 0 ? 0 : 1) // see p.22/H.263
|