]> git.buserror.net Git - polintos/scott/priv.git/commitdiff
Explicitly set unsigned long array size in GUID union.
authorScott Wood <scott@buserror.net>
Fri, 24 Feb 2012 04:52:57 +0000 (22:52 -0600)
committerScott Wood <scott@buserror.net>
Fri, 9 Mar 2012 05:18:05 +0000 (23:18 -0600)
Otherwise GCC complains about array access out of bounds,
even though the char part of the union ensures adequate size.

Signed-off-by: Scott Wood <scott@buserror.net>
include/c++/orb.h

index 716b18617837c17e70b3fb4dfa0b2b91c689a80e..fa2f54846379c067e84acbfff1e3a8a93028c75d 100644 (file)
@@ -43,7 +43,7 @@ namespace System {
                
                union GUID {
                        unsigned char c[16];
-                       unsigned long l[];
+                       unsigned long l[16 / sizeof(unsigned long)];
                };
 
                uintptr_t downcast(::System::_i_Object *obj, const GUID *new_guid);