Skip to content

gdebugcontrollerdbus: Mark a variable as G_GNUC_UNUSED

Philip Withnall requested to merge pwithnall/glib:debug-controller-unused into main

It’s not used when compiling with G_DISABLE_ASSERT. This fixes the CI build failure here: https://gitlab.gnome.org/GNOME/glib/-/jobs/1843082

[461/1229] Compiling C object 'gio/6ae6c9e@@gio-2.0@sha/gdebugcontrollerdbus.c.o'.
FAILED: gio/6ae6c9e@@gio-2.0@sha/gdebugcontrollerdbus.c.o
cc -Igio/6ae6c9e@@gio-2.0@sha -Igio -I../gio -I. -I../ -Iglib -I../glib -Igobject -I../gobject -Igmodule -I../gmodule -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=gnu99 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_ENABLE_DEBUG -DG_DISABLE_ASSERT -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wunused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Wstrict-prototypes -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=missing-prototypes -fPIC '-DG_LOG_DOMAIN="GLib-GIO"' -DGIO_COMPILATION '-DGIO_MODULE_DIR="/usr/local/lib64/gio/modules"' '-DLOCALSTATEDIR="/usr/local/var"' -fvisibility=hidden -MD -MQ 'gio/6ae6c9e@@gio-2.0@sha/gdebugcontrollerdbus.c.o' -MF 'gio/6ae6c9e@@gio-2.0@sha/gdebugcontrollerdbus.c.o.d' -o 'gio/6ae6c9e@@gio-2.0@sha/gdebugcontrollerdbus.c.o' -c ../gio/gdebugcontrollerdbus.c
../gio/gdebugcontrollerdbus.c: In function ‘authorize_cb’:
../gio/gdebugcontrollerdbus.c:345:32: error: unused variable ‘priv’ [-Werror=unused-variable]
  345 |   GDebugControllerDBusPrivate *priv = g_debug_controller_dbus_get_instance_private (self);
      |                                ^~~~
cc1: all warnings being treated as errors

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Merge request reports