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 773133 - Pygobject build fails due to unused variable in gobject-introspection/tests/gimmarshallingtests.c
Pygobject build fails due to unused variable in gobject-introspection/tests/g...
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-10-18 06:04 UTC by Suyash Garg
Modified: 2018-02-08 12:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests/gimmarshallingtests.c: Unused variable x1 in gi_marshalling_tests_array_zero_terminated_return_unichar function (1.30 KB, patch)
2016-10-18 06:25 UTC, Suyash Garg
none Details | Review
tests/gimmarshallingtests.c: Unused variable x1 in gi_marshalling_tests_array_zero_terminated_return_unichar function (1.20 KB, patch)
2016-10-18 11:15 UTC, Suyash Garg
none Details | Review

Description Suyash Garg 2016-10-18 06:04:54 UTC
make[2]: Entering directory '/home/ferbncode/.cache/jhbuild/build/pygobject/tests'
      CC       libgimarshallingtests_la-gimarshallingtests.lo
    test -L libregress.so || ln -s .libs/libregress.so libregress.so
    test -L testhelper.so || ln -s .libs/testhelper.so testhelper.so
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c: In function ‘gi_marshalling_tests_array_bool_out’:
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c:1594:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       *bools = values;
              ^
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c: In function ‘gi_marshalling_tests_array_unichar_out’:
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c:1606:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       *chars = values;
              ^
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c: In function ‘gi_marshalling_tests_array_zero_terminated_return_unichar’:
    /home/ferbncode/jhbuild/install/share/gobject-introspection-1.0/tests/gimarshallingtests.c:1725:12: error: unused variable ‘ix’ [-Werror=unused-variable]
       unsigned ix;
                ^~
    cc1: some warnings being treated as errors
    make[2]: *** [Makefile:553: libgimarshallingtests_la-gimarshallingtests.lo] Error 1
    make[2]: Leaving directory '/home/ferbncode/.cache/jhbuild/build/pygobject/tests'
    make[1]: *** [Makefile:676: all-recursive] Error 1
    make[1]: Leaving directory '/home/ferbncode/.cache/jhbuild/build/pygobject'
    make: *** [Makefile:499: all] Error 2
    *** Error during phase build of pygobject: ########## Error running make -j 3  *** [59/60]
Comment 1 Suyash Garg 2016-10-18 06:25:37 UTC
Created attachment 337919 [details] [review]
tests/gimmarshallingtests.c: Unused variable x1 in gi_marshalling_tests_array_zero_terminated_return_unichar function

In building pygobject from jhbuild, the make failed due to an unused
variable x1 in the gi_marshalling_test_array_zero_terminated_return_unichar function at line 1725 in the tests/gimarshallingtests.c.

To fix the issue, the declaration of the variable was removed from the tests/gimarshallingtests.c file at line 1725. The build of both pygobject and gobject_introspection were successful after the change.
Comment 2 Georges Basile Stavracas Neto 2016-10-18 06:36:05 UTC
Review of attachment 337919 [details] [review]:

Needs work.

::: tests/gimarshallingtests.c
@@ +1723,3 @@
 {
   static const gunichar value[] = GI_MARSHALLING_TESTS_CONSTANT_UCS4;
+  /*unsigned ix;*/

Instead of commenting unused code, simply remove it.
Comment 3 Suyash Garg 2016-10-18 11:15:34 UTC
Created attachment 337936 [details] [review]
tests/gimmarshallingtests.c: Unused variable x1 in gi_marshalling_tests_array_zero_terminated_return_unichar function

In building pygobject from jhbuild, the make failed due to an unused
variable x1 in the gi_marshalling_test_array_zero_terminated_return_unichar function at line 1725 in the tests/gimarshallingtests.c.

To fix the issue, the code doing the declaration of the variable was
removed from the tests/gimarshallingtests.c file at line 1725.
Comment 4 Christoph Reiter (lazka) 2017-03-29 18:33:44 UTC
fyi, pygobject master no longer passes any warnings flags when building gimarshallingtests
Comment 5 GNOME Infrastructure Team 2018-02-08 12:43:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/165.