[glib: 1/2] gresource-tool: Fix unused-but-set-variable warn with G_DISABLE_ASSERT




commit 425702df9c5590feca8e28e6948d8a3e8edcd649
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Feb 18 01:40:44 2022 +0000

    gresource-tool: Fix unused-but-set-variable warn with G_DISABLE_ASSERT
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gio/gresource-tool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c
index aa718974e..8d738c280 100644
--- a/gio/gresource-tool.c
+++ b/gio/gresource-tool.c
@@ -180,7 +180,7 @@ elf_foreach_resource_section (Elf             *elf,
                               SectionCallback  callback,
                               gpointer         data)
 {
-  int ret;
+  int ret G_GNUC_UNUSED  /* when compiling with G_DISABLE_ASSERT */;
   size_t shstrndx, shnum;
   size_t scnidx;
   Elf_Scn *scn;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]