From: Philippe Waroquiers Date: Thu, 12 Mar 2015 22:46:58 +0000 (+0000) Subject: Fix non portability spotted by Florian: X-Git-Tag: svn/VALGRIND_3_11_0~586 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b70c77ad772cc3e06760134703021b96a245546;p=thirdparty%2Fvalgrind.git Fix non portability spotted by Florian: An array must have at least 1 element. 0 element is accepted by gcc but is not portable. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15006 --- diff --git a/coregrind/m_aspacemgr/aspacemgr-common.c b/coregrind/m_aspacemgr/aspacemgr-common.c index c41de1f359..20a1783661 100644 --- a/coregrind/m_aspacemgr/aspacemgr-common.c +++ b/coregrind/m_aspacemgr/aspacemgr-common.c @@ -354,7 +354,9 @@ Bool ML_(am_resolve_filename) ( Int fd, /*OUT*/HChar* buf, Int nbuf ) /*--- ---*/ /*-----------------------------------------------------------------*/ struct _VgStack { - HChar bytes[0]; + HChar bytes[1]; + // We use a fake size of 1. A bigger size is allocated + // by VG_(am_alloc_VgStack). }; /* Allocate and initialise a VgStack (anonymous valgrind space).