Ignore GCC memory overflow warnings when testing overflows

We know we are overflowing the maximum allocation: it's what we're
testing for.

https://bugzilla.gnome.org/show_bug.cgi?id=794732
This commit is contained in:
Emmanuele Bassi 2018-03-27 16:39:21 +01:00
parent 07731ff3fc
commit 327c379862

View File

@ -23,6 +23,8 @@
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC optimize (1) #pragma GCC optimize (1)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Walloc-size-larger-than="
#endif #endif
#include "glib.h" #include "glib.h"
@ -198,6 +200,10 @@ empty_alloc (void)
} }
#endif #endif
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
int int
main (int argc, main (int argc,
char *argv[]) char *argv[])