]> granicus.if.org Git - gc/commitdiff
Eliminate 'value exceeds maximum object size' GCC warning in huge_test
authorIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 08:44:17 +0000 (11:44 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 15 Dec 2017 18:11:21 +0000 (21:11 +0300)
* tests/huge_test.c [!GC_ATTR_ALLOC_SIZE] (GC_ATTR_ALLOC_SIZE): Define
to empty (before include gc.h).

tests/huge_test.c

index 10d13ef230aef760c87474a856d53f9f3556ac11..bd3ad6c74f0067c6eef82e55023df7d211ad1f33 100644 (file)
     /* it fails predictably.                                            */
 #endif
 
+#ifndef GC_ATTR_ALLOC_SIZE
+  /* Omit alloc_size attribute to avoid compiler warnings about         */
+  /* exceeding maximum object size when values close to GC_SWORD_MAX    */
+  /* are passed to GC_MALLOC.                                           */
+# define GC_ATTR_ALLOC_SIZE(argnum) /* empty */
+#endif
+
 #include "gc.h"
 
 /*