GNOME Bugzilla – Bug 684700
test suite: return makes pointer from integer
Last modified: 2012-09-25 06:57:37 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
Whoops, thanks for catching this! I wish there was a -Werror=... for this.. Fixed in http://git.gnome.org/browse/pygobject/commit/?id=5285f14fee93d2729d4422c40a945adc2be69c14