GNOME Bugzilla – Bug 629757
private #defines in a source file should not provoke warnings
Last modified: 2015-02-07 16:49:37 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...
(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.
*** Bug 650200 has been marked as a duplicate of this bug. ***
Should be fixed now.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]