diff --git a/cfg/gtk.cfg b/cfg/gtk.cfg
index e2fe36394..d9173308a 100644
--- a/cfg/gtk.cfg
+++ b/cfg/gtk.cfg
@@ -3928,9 +3928,80 @@
false
-
-
+
+
false
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/cfg/gtk.c b/test/cfg/gtk.c
index 295d8ed61..78cfc3716 100644
--- a/test/cfg/gtk.c
+++ b/test/cfg/gtk.c
@@ -50,6 +50,9 @@ void validCode(int argInt)
gchar * pGchar1 = g_strconcat("a", "b", NULL);
printf("%s", pGchar1);
g_free(pGchar1);
+
+ GError * pGerror = g_error_new(1, -2, "a %d", 1);
+ g_error_free(pGerror);
}
void g_malloc_test()
@@ -121,3 +124,19 @@ void g_try_new0_test()
printf("%p", pNew2);
// cppcheck-suppress memleak
}
+
+void g_error_new_test()
+{
+ // valid
+ GError * pNew1 = g_error_new(1, -2, "a %d", 1);
+ printf("%p", pNew1);
+ g_error_free(pNew1);
+
+ // cppcheck-suppress ignoredReturnValue
+ // cppcheck-suppress leakReturnValNotUsed
+ g_error_new(1, -2, "a %d", 1);
+
+ GError * pNew2 = g_error_new(1, -2, "a %d", 1);
+ printf("%p", pNew2);
+ // cppcheck-suppress memleak
+}