From 4dae640e8c42aed9508803e47cba5fe60bff0621 Mon Sep 17 00:00:00 2001 From: versat Date: Fri, 15 Feb 2019 08:44:21 +0100 Subject: [PATCH] gtk.cfg: Add type conversion macros Reference: https://developer.gnome.org/glib/stable/glib-Type-Conversion-Macros.html daca@home found that they are missing. --- cfg/gtk.cfg | 7 +++++++ test/cfg/gtk.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/cfg/gtk.cfg b/cfg/gtk.cfg index d86fec08e..a65b2e698 100644 --- a/cfg/gtk.cfg +++ b/cfg/gtk.cfg @@ -9,6 +9,13 @@ + + + + + + + diff --git a/test/cfg/gtk.c b/test/cfg/gtk.c index c15e54011..ff63af205 100644 --- a/test/cfg/gtk.c +++ b/test/cfg/gtk.c @@ -32,6 +32,10 @@ void validCode(int argInt) // cppcheck-suppress checkLibraryNoReturn g_assert_not_reached(); } + gpointer p = GINT_TO_POINTER(1); + int i = GPOINTER_TO_INT(p); + // cppcheck-suppress knownConditionTrueFalse + if (i == 1) {} } void g_malloc_test()