From eec09bcae65f83325364c2f0673801319b3637e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A1n=20Tomko?= Date: Fri, 3 Sep 2021 16:36:54 +0200 Subject: [PATCH] rpc: mark source returned by virEventGLibAddSocketWatch as unused MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Two users of virEventGLibAddSocketWatch care about the GSource it returns. The other three free it by assigning it to an autofreed variable. Mark them with G_GNUC_UNUSED to make this obvious to the reader and the compiler. Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- src/rpc/virnetclient.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index ffe2f343f9..f526ad89ec 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -882,7 +882,7 @@ virNetClientIOEventTLS(int fd, static gboolean virNetClientTLSHandshake(virNetClient *client) { - g_autoptr(GSource) source = NULL; + g_autoptr(GSource) G_GNUC_UNUSED source = NULL; GIOCondition ev; int ret; @@ -939,7 +939,7 @@ int virNetClientSetTLSSession(virNetClient *client, int ret; char buf[1]; int len; - g_autoptr(GSource) source = NULL; + g_autoptr(GSource) G_GNUC_UNUSED source = NULL; #ifndef WIN32 sigset_t oldmask, blockedsigs; @@ -1664,7 +1664,7 @@ static int virNetClientIOEventLoop(virNetClient *client, #endif /* !WIN32 */ int timeout = -1; virNetMessage *msg = NULL; - g_autoptr(GSource) source = NULL; + g_autoptr(GSource) G_GNUC_UNUSED source = NULL; GIOCondition ev = 0; struct virNetClientIOEventData data = { .client = client, -- 2.47.2