From f6c37490158981e13ad3567cbc96b4abb9d5d2d2 Mon Sep 17 00:00:00 2001 From: versat Date: Thu, 28 Feb 2019 15:29:37 +0100 Subject: [PATCH] gtk.cfg: Add support for g_alloca() and g_newa(). References: https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-alloca https://github.com/GNOME/glib/blob/master/glib/galloca.h --- cfg/gtk.cfg | 3 +++ test/cfg/gtk.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/cfg/gtk.cfg b/cfg/gtk.cfg index 31c1a22df..c51a1dbee 100644 --- a/cfg/gtk.cfg +++ b/cfg/gtk.cfg @@ -40,6 +40,9 @@ + + + g_thread_new g_thread_try_new diff --git a/test/cfg/gtk.c b/test/cfg/gtk.c index be8b361d1..a46d04f7c 100644 --- a/test/cfg/gtk.c +++ b/test/cfg/gtk.c @@ -70,3 +70,10 @@ void g_print_test() // cppcheck-suppress invalidPrintfArgType_uint g_printerr("%x", "a"); } + +void g_alloca_test() +{ + // cppcheck-suppress allocaCalled + char * pBuf1 = g_alloca(5); + pBuf1[0] = '\0'; +}