]> 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>
Mon, 18 Dec 2017 07:24:10 +0000 (10:24 +0300)
(Cherry-pick commit 012fc6c8 from 'release-7_6' branch.)

* tests/huge_test.c [!GC_ATTR_ALLOC_SIZE] (GC_ATTR_ALLOC_SIZE): Define
to empty (before include gc.h).

tests/huge_test.c

index bde9836d5a8c48c02f9c68c925932739cdd1e255..649ea4bb99d7f7168b4c3928504aecdc834c44c1 100644 (file)
 # define GC_IGNORE_WARN
 #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"
 
 /*