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 754448 - build: warnings raised to error by openSUSE BuildRoot Policies
build: warnings raised to error by openSUSE BuildRoot Policies
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
git master
Other Linux
: Normal normal
: ---
Assigned To: tracker-extractor
tracker-extractor
Depends on:
Blocks:
 
 
Reported: 2015-09-02 11:39 UTC by Dominique Leuenberger
Modified: 2015-09-03 08:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the dummy_module (1.20 KB, patch)
2015-09-02 11:43 UTC, Dominique Leuenberger
none Details | Review

Description Dominique Leuenberger 2015-09-02 11:39:25 UTC
While building tracker 1.5.2 on openSUSE (Tumbleweed), the build root policy checker raised an error:

> E: tracker 64bit-portability-issue /usr/include/glib-2.0/glib/gmacros.h:234

The error is based on compiler output, in this specific case:

>[  114s] In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0,
>[  114s]                  from /usr/include/glib-2.0/glib/gtypes.h:32,
>[  114s]                  from /usr/include/glib-2.0/glib/galloca.h:32,
>[  114s]                  from /usr/include/glib-2.0/glib.h:30,
>[  114s]                  from tracker-module-manager.h:27,
>[  114s]                  from tracker-module-manager.c:24:
>[  114s] /usr/include/glib-2.0/glib/gmacros.h:234:14: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
>[  114s]  #define TRUE (!FALSE)
>[  114s]               ^
>[  114s] tracker-module-manager.c:49:28: note: in expansion of macro 'TRUE'
>[  114s]   dummy_extract_func, NULL, TRUE
>[  114s]                             ^
>[  114s] /usr/include/glib-2.0/glib/gmacros.h:234:14: note: (near initialization for 'dummy_module.shutdown_func')
>[  114s]  #define TRUE (!FALSE)
>[  114s]               ^
>[  114s] tracker-module-manager.c:49:28: note: in expansion of macro 'TRUE'
>[  114s]   dummy_extract_func, NULL, TRUE
>[  114s]                             ^

I tracked down the issue to commit
https://git.gnome.org/browse/tracker/commit/src/?id=51e2021fa150e4f4d463ed4baf16051fc54e4fda&context=15&ignorews=0&ss=0

Specifically, 
+static ModuleInfo dummy_module = {
+	NULL, TRACKER_MODULE_MAIN_THREAD,
+	dummy_extract_func, NULL, TRUE
+};

Looking at the typedef of ModuleInfo:

 typedef struct {
 	GModule *module;
 	TrackerModuleThreadAwareness thread_awareness;
 	TrackerExtractMetadataFunc extract_func;
 	TrackerExtractInitFunc init_func;
 	TrackerExtractShutdownFunc shutdown_func;
 	guint initialized : 1;
 } ModuleInfo;

it becomes apparent that 'TRUE' is passed as 'TrackerExtractShutdownFunc' pointer, which can't be what was meant to be done. As there is no shutdownfunc, there is an additional NULL missing in the line.
Comment 1 Dominique Leuenberger 2015-09-02 11:43:17 UTC
Created attachment 310486 [details] [review]
Fix the dummy_module
Comment 2 Dominique Leuenberger 2015-09-03 08:32:25 UTC
Patch commited as
https://git.gnome.org/browse/tracker/commit/?id=60f6d1f6be5fb01c88babe246e06f620796ce319

(as agreed by Martyn on IRC)