RESOLVED INVALID 30226
[GTK] Unable to compile software that use WebKitGTK+ with -pedantic flag.
https://bugs.webkit.org/show_bug.cgi?id=30226
Summary [GTK] Unable to compile software that use WebKitGTK+ with -pedantic flag.
Michał Buczeluk
Reported 2009-10-08 11:30:41 PDT
When i try to compile any software that use WebKitGTK+ with -pedantic flag passed to compiler i get in return some errors pointing at WebKit headers. Here is compiler output: In file included from /usr/include/webkit-1.0/webkit/webkit.h:27, from webkit.cpp:2: /usr/include/webkit-1.0/webkit/webkithittestresult.h:74: error: comma at end of enumerator list In file included from /usr/include/webkit-1.0/webkit/webkit.h:40, from webkit.cpp:2: /usr/include/webkit-1.0/webkit/webkitwebnavigationaction.h:39: error: comma at end of enumerator list In file included from /usr/include/webkit-1.0/webkit/webkitenumtypes.h:25, from /usr/include/webkit-1.0/webkit/webkit.h:44, from webkit.cpp:2: /usr/include/webkit-1.0/webkit/webkiterror.h:38: error: comma at end of enumerator list /usr/include/webkit-1.0/webkit/webkiterror.h:47: error: comma at end of enumerator list /usr/include/webkit-1.0/webkit/webkiterror.h:56: error: comma at end of enumerator list After removal of mentioned commas everything works properly. Steps to reproduce: 1. Create any code that include webkit header files. For example: #include <cstdlib> #include <webkit/webkit.h> int main(int argc, char **argv) { return EXIT_SUCCESS; } 2. Compile it with -pedantic flag on: (doesn't matter if this is C++ or C code as both gcc and g++ will produce mentioned errors) g++ -pedantic `pkg-config --cflags --libs webkit-1.0` test.cpp -o test
Attachments
Fix pedantic error in webkiterror.h (1.39 KB, patch)
2010-12-16 05:04 PST, Rupert Swarbrick
no flags
Fix "commas in enum" error on the other two includes too! (2.73 KB, patch)
2010-12-16 05:19 PST, Rupert Swarbrick
no flags
Rupert Swarbrick
Comment 1 2010-12-16 05:04:02 PST
Created attachment 76753 [details] Fix pedantic error in webkiterror.h I'm surprised this bug has survived so long... Anyway, it's annoying having to work around it on my system to let me compile things with -Werror -Wall so here's a patch in the hope it will spur someone into applying & fixing it!
Rupert Swarbrick
Comment 2 2010-12-16 05:19:06 PST
Created attachment 76755 [details] Fix "commas in enum" error on the other two includes too! Oops: didn't realise that there were two more headers with the same problem. This patch fixes all three.
Martin Robinson
Comment 3 2014-04-08 18:18:17 PDT
The GTK+ port of WebKit1 has been removed.
Note You need to log in before you can comment on or make changes to this bug.