From: Scott Wood Date: Fri, 24 Feb 2012 04:52:57 +0000 (-0600) Subject: Explicitly set unsigned long array size in GUID union. X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=commitdiff_plain;h=c935c41d1f2969dae860cdb16127779d2970a0e3;ds=sidebyside Explicitly set unsigned long array size in GUID union. 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 --- diff --git a/include/c++/orb.h b/include/c++/orb.h index 716b186..fa2f548 100644 --- a/include/c++/orb.h +++ b/include/c++/orb.h @@ -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);