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 540180 - gnumeric-1.8.2 fails to compile with ‘-pedantic’ in CFLAGS
gnumeric-1.8.2 fails to compile with ‘-pedantic’ in CFLAGS
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
1.8.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-06-25 16:11 UTC by Nico R.
Modified: 2008-06-28 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which fixes non ISO C89 conforming code in plugins/openoffice/openoffice-read.c (35.02 KB, patch)
2008-06-25 16:16 UTC, Nico R.
none Details | Review

Description Nico R. 2008-06-25 16:11:09 UTC
When gnumeric-1.8.2 is compiled with current versions of gcc, this is done in GNU C89 mode. If the user specifies ‘-pedantic’ in CFLAGS, the build breaks.

Only the file plugins/openoffice/openoffice-read.c is affected.

I am going to attach a patch which fixes the problem.
Comment 1 Nico R. 2008-06-25 16:16:07 UTC
Created attachment 113405 [details] [review]
Patch which fixes non ISO C89 conforming code in plugins/openoffice/openoffice-read.c

This patch fixes the code to more strictly conform to ISO C. It is rather long, but in fact does not do much: it just moves a large array around in the code, and adds the necessary function prototypes above the array.

This patch was created against gnumeric-1.8.2, but can also be cleanly applied to the gnumeric-1-8 branch (tested against r16669 a minute ago).
Comment 2 Morten Welinder 2008-06-28 13:54:48 UTC
Fixed differently without the need to predeclare all those functions.
Comment 3 Nico R. 2008-06-28 15:15:37 UTC
Ah, you have introduced a new function. Good idea!
Thanks, Morten!
Comment 4 Morten Welinder 2008-06-28 16:09:48 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.