From 6e337ff19fd9a35404e7ab33d6acf27b026a7ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= Date: Sun, 10 May 2026 10:19:29 +0200 Subject: [PATCH] gtk.cfg: g_application_get_default is transfer none See https://docs.gtk.org/gio/type_func.Application.get_default.html --- cfg/gtk.cfg | 7 ++++++- test/cfg/gtk.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cfg/gtk.cfg b/cfg/gtk.cfg index 9b89a069903..c4ab8972155 100644 --- a/cfg/gtk.cfg +++ b/cfg/gtk.cfg @@ -807,7 +807,6 @@ g_app_info_get_default_for_uri_scheme g_application_new g_application_get_dbus_connection - g_application_get_default g_buffered_input_stream_new g_buffered_output_stream_new g_cancellable_new @@ -926,6 +925,12 @@ g_file_attribute_matcher_ref g_file_attribute_matcher_unref + + + false + + + true diff --git a/test/cfg/gtk.c b/test/cfg/gtk.c index 3e4e5b1cb06..bcee84c8264 100644 --- a/test/cfg/gtk.c +++ b/test/cfg/gtk.c @@ -82,6 +82,10 @@ void validCode(int argInt, GHashTableIter * hash_table_iter, GHashTable * hash_t // cppcheck-suppress valueFlowBailout // TODO: caused by ? printf("%s", str); g_free(str); + + // transfer none functions: return value should not be unreffed + const GApplication *app = g_application_get_default(); + printf("%p\n", app); } void g_malloc_test()