After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751738 - Unused-variable warnings in glib/tests/autoptr.c
Unused-variable warnings in glib/tests/autoptr.c
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.44.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-06-30 16:39 UTC by Daniel Macks
Modified: 2017-10-06 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Add some assertions on some otherwise-unused variables (1.04 KB, patch)
2017-10-06 11:58 UTC, Philip Withnall
committed Details | Review

Description Daniel Macks 2015-06-30 16:39:41 UTC
Building glib-2.44.1 on OS X 10.8 (xcode/clang):

  CC       autoptr.o
autoptr.c:17:25: warning: unused variable 'alwaysnull_again' [-Wunused-variable]
      g_autofree gchar *alwaysnull_again = NULL;
                        ^
autoptr.c:9:21: warning: unused variable 'alwaysnull' [-Wunused-variable]
  g_autofree gchar *alwaysnull = NULL;
                    ^
autoptr.c:227:18: warning: unused variable 'stackval' [-Wunused-variable]
  g_auto(GQueue) stackval = G_QUEUE_INIT;
                 ^
3 warnings generated.

Sure enough, those variables are declared and then not actually used.
Comment 1 Philip Withnall 2017-10-06 11:57:56 UTC
The following fix has been pushed:
860dc94 tests: Add some assertions on some otherwise-unused variables
Comment 2 Philip Withnall 2017-10-06 11:58:03 UTC
Created attachment 361039 [details] [review]
tests: Add some assertions on some otherwise-unused variables

Signed-off-by: Philip Withnall <withnall@endlessm.com>