From d83d454fe081daab0392eb9c304a04d311c220f9 Mon Sep 17 00:00:00 2001 From: Aleksandr Zvegintsev Date: Wed, 26 Jun 2024 15:52:11 +0200 Subject: [PATCH] fix warnings --- .../src/main/native-glass/gtk/screencast_portal.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/javafx.graphics/src/main/native-glass/gtk/screencast_portal.c b/modules/javafx.graphics/src/main/native-glass/gtk/screencast_portal.c index 47cb845fac6..2e1cce71e88 100644 --- a/modules/javafx.graphics/src/main/native-glass/gtk/screencast_portal.c +++ b/modules/javafx.graphics/src/main/native-glass/gtk/screencast_portal.c @@ -234,7 +234,10 @@ gboolean initXdgDesktopPortal() { } portal->senderName = nameStr->str; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" g_string_free(nameStr, FALSE); +#pragma GCC diagnostic pop DEBUG_SCREENCAST("connection/sender name %s / %s\n", name, @@ -275,7 +278,10 @@ static void updateRequestPath( ); *token = tokenStr->str; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" g_string_free(tokenStr, FALSE); +#pragma GCC diagnostic pop GString *pathStr = g_string_new(NULL); @@ -287,7 +293,10 @@ static void updateRequestPath( ); *path = pathStr->str; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" g_string_free(pathStr, FALSE); +#pragma GCC diagnostic pop } static void updateSessionToken( @@ -305,7 +314,10 @@ static void updateSessionToken( ); *token = tokenStr->str; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" g_string_free(tokenStr, FALSE); +#pragma GCC diagnostic pop } static void registerScreenCastCallback(