GNOME Bugzilla – Bug 754448
build: warnings raised to error by openSUSE BuildRoot Policies
Last modified: 2015-09-03 08:32: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.
Created attachment 310486 [details] [review] Fix the dummy_module
Patch commited as https://git.gnome.org/browse/tracker/commit/?id=60f6d1f6be5fb01c88babe246e06f620796ce319 (as agreed by Martyn on IRC)