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 629757 - private #defines in a source file should not provoke warnings
private #defines in a source file should not provoke warnings
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-09-15 13:12 UTC by Simon McVittie
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon McVittie 2010-09-15 13:12:28 UTC
From telepathy-glib in the vicinity of 0.11.15, with g-i git commit c31120dd00d2ea1513399832461ed4437c6940de:

/home/smcv/Collabora/telepathy/tpglib/telepathy-glib/account-manager.h:100: Warning: TelepathyGLib: symbol='MC5_BUS_NAME': Unknown namespace for symbol 'MC5_BUS_NAME'
/home/smcv/Collabora/telepathy/tpglib/telepathy-glib/protocol.h:1161: Warning: TelepathyGLib: symbol='PROTOCOL_PREFIX_LEN': Unknown namespace for symbol 'PROTOCOL_PREFIX_LEN'

These symbols are not public or even internal API: they're defined in a source file and used only within that source file.

smcv@reptile% git grep MC5_BUS_NAME
telepathy-glib/account-manager.c:#define MC5_BUS_NAME "org.freedesktop.Telepathy.MissionControl5"
telepathy-glib/account-manager.c:      "bus-name", MC5_BUS_NAME,
smcv@reptile% git grep PROTOCOL_PREFIX_LEN
telepathy-glib/protocol.c:#define PROTOCOL_PREFIX_LEN 9
telepathy-glib/protocol.c:tp_verify (sizeof (PROTOCOL_PREFIX) == PROTOCOL_PREFIX_LEN + 1);
telepathy-glib/protocol.c:  name = group + PROTOCOL_PREFIX_LEN;

Oddly, PROTOCOL_PREFIX (a string constant defined on the line before PROTOCOL_PREFIX_LEN) does not provoke a warning. I can't see how it would differ from the behaviour of MC5_BUS_NAME...
Comment 1 Dan Winship 2010-09-15 13:37:11 UTC
(In reply to comment #0)
> Oddly, PROTOCOL_PREFIX (a string constant defined on the line before
> PROTOCOL_PREFIX_LEN) does not provoke a warning. I can't see how it would
> differ from the behaviour of MC5_BUS_NAME...

It's supposed to ignore #defines in .c files... there's a test for that in tests/scanner/foo.c (FOO_DEFINE_SHOULD_NOT_BE_EXPOSED) which seems to still be working. So probably something is going wrong such that it only ignores *some* #defines.
Comment 2 Colin Walters 2011-08-10 14:43:47 UTC
*** Bug 650200 has been marked as a duplicate of this bug. ***
Comment 3 Colin Walters 2011-08-10 15:51:29 UTC
Should be fixed now.
Comment 4 André Klapper 2015-02-07 16:49:37 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]