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 69655 - Lots of redundant declarations
Lots of redundant declarations
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.4.13
Other other
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-01-25 13:29 UTC by nfritsch
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description nfritsch 2002-01-25 13:29:09 UTC
If you compile with -Wredundant-decls (I used gcc 2.95), you get pages of warnings because 
of redundant functions declarations.
Most of them are redundant decls in different 
files (like parser.h and global.h), but some of them are in the same file.
See 
parserInternals.h for example, lines 192 and 194...

It doesn't make the code crash, 
but makes it obscure, and is prone to bugs if any change need to be done.
Comment 1 Daniel Veillard 2002-02-10 13:20:39 UTC
Grumble ... I disagree with the premice "makes it obscure, and is
prone to bugs" especially in the presence of -Wimplicit and the
Severity level as "normal".

Anyway I did it, fixed in CVS.

Not sure it changes that much. I was already compiling with
-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch
-Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized
-Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Winline

I now compile with
-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch
-Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized
-Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wnested-externs -Winline -Wredundant-decls

I assume you are subcribed to the list and that you will help the
people who will have problems because the APIs are now defined
by a smaller set of includes. I accept when people try to give
lessons but they need to share the associate work, isn't it !
I people have troubles and you don't help I will likely revert
the changes back.

  thanks a lot in advance for your future help !

Daniel
Comment 2 nfritsch 2002-02-11 08:25:37 UTC
Thanks for fixing it.
I didn't intend to give lessons, sorry if it felt like it; I 
actually started fixing it myself, but then I realize it was quite big and I didn't 
know the code arch enough.
Yes, I'm on the list.
Comment 3 Daniel Veillard 2002-02-11 09:13:20 UTC
According to Jody Goldberg, this already broke in the Gnome CVS:
  gconf, gnome-print, gtkhtml2, nautilus and gnumeric

I.e. nearly everything :-\
I have tried to make a second pass to keep the original semantic
of the includes, but it's hard to make any guarantee.
If I can't fix the problem quickly, I'm afraid I will have to
revert part of it ...

Daniel
Comment 4 Daniel Veillard 2002-02-12 08:39:36 UTC
Well I fixed the includes again, and it seems to have
corrected the problem, so this change has made into the
2.4.15 release. I hope it won't give too many troubles,

Daniel