Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229369 - [PATCH] gnome-extra/evolution-data-server-1.12.3 does not compile with -pedantic (code not ISO C compliant)
Summary: [PATCH] gnome-extra/evolution-data-server-1.12.3 does not compile with -pedan...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-25 11:21 UTC by Nico R.
Modified: 2008-06-25 12:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to allow gnome-extra/evolution-data-server-1.12.3 to be compiled with ‘-pedantic’ in CFLAGS (evolution_data_server-1.12.3-pedantic-1.patch,26.66 KB, patch)
2008-06-25 11:27 UTC, Nico R.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico R. 2008-06-25 11:21:51 UTC
gnome-extra/evolution-data-server-1.12.3 contains two files with code that does not conform to ISO C. If CFLAGS includes ‘-pedantic’, the build breaks due to arrays being declared in the code without a length specifier, and later being initialized with a static initializer.

I am going to attach a patch which fixes the problems.
Comment 1 Nico R. 2008-06-25 11:27:38 UTC
Created attachment 158369 [details, diff]
Patch to allow gnome-extra/evolution-data-server-1.12.3 to be compiled with ‘-pedantic’ in CFLAGS

This patch fixes a problem in static code, and a script which auto-generates C code.

Part of this patch applies to libical-0.24, which is present in the evolution-data-server tree; it is possible that the same problem also appears in stand-alone versions of libical. Perhaps this should be forwarded upstream as well.

This patch seems to be rather large, but this is only due to moving big parts of the code around, in order to fix dependencies. In addition to moving the arrays, the patch adds function prototypes (the functions are referenced in the arrays).
The code generation script and its input file are modified a bit to allow the code to be inserted somewhere in the middle of the file, and not only at the end.
Comment 2 Nico R. 2008-06-25 11:35:32 UTC
I just had a very brief look at the source code for libical-0.31 <URL:http://easyinstall.citadel.org/libical-0.31.tar.gz>, and I’d say that the problem also applies to that library in that version.

Perhaps you have some time to verify this, Michele?
Thanks.
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2008-06-25 12:12:35 UTC
Seriously, "-pedantic" will break a *lot* of code. We can't possibly maintain such patches here.

If you really need ISO C code (for what reason?), then you need to file a bug in upstream's BTS so that they can apply your patch there.

http://bugzilla.gnome.org/ is where you should submit the patch.

Thanks