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 684700 - test suite: return makes pointer from integer
test suite: return makes pointer from integer
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Windows
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-24 08:29 UTC by Dominique Leuenberger
Modified: 2012-09-25 06:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominique Leuenberger 2012-09-24 08:29:26 UTC
While building pygobject on Open Build Service (OBS), the build root policy checker complains about:

E: python-gobject 64bit-portability-issue testhelpermodule.c:328, 331, 332

The issue is raised to an error from those compiler warnings:
testhelpermodule.c:328:3: warning: return makes pointer from integer without a cast [enabled by default]
testhelpermodule.c:331:7: warning: return makes pointer from integer without a cast [enabled by default]
testhelpermodule.c:332:3: warning: return makes pointer from integer without a cast [enabled by default]


In fact the code affected is:

325:static gint64 *
326:test_int64_callback (GObject *object, gint64 i)
327:{
328:  g_return_val_if_fail (G_IS_OBJECT (object), -1);
329:
330:  if (i == G_MAXINT64)
331:      return i-1;
332:  return i;
333:}

=> 328: we return -1 as a pointer.. sounds odd
=> 331: we return i (gint64) as a pointer (gint64 *)
=> 332: same as 331
Comment 1 Martin Pitt 2012-09-25 06:57:37 UTC
Whoops, thanks for catching this! I wish there was a -Werror=... for this..

Fixed in 

http://git.gnome.org/browse/pygobject/commit/?id=5285f14fee93d2729d4422c40a945adc2be69c14