On Wed, May 07, 2014 at 10:57:50PM +0200, Patrik Lundin wrote: > > The opendnssec port is a work in progress. The most annoying thing > while building currently is the warnings regarding "comma at end of > enumerator list" which seems to be the result of inconsistent use of > "-std=c99" which i am not sure how to solve properly. >
Trying to figure out what is the best course of action to remove these warnings I am first of all trying to figure out why they are thrown on OpenBSD but not on a Ubuntu 14.04 system that I use for comparision. It seems to me it comes down to some sort of special handling of included headers on the Ubuntu box that I do not see on OpenBSD. Basically i see this: On OpenBSD using the system include syntax: # echo '#include <ldns/error.h>' > test.c # cc -I/usr/local/include -pedantic -Wall -Wextra -c test.c In file included from test.c:1: /usr/local/include/ldns/error.h:130: warning: comma at end of enumerator list On OpenBSD including the file directly: # echo '#include "/usr/local/include/ldns/error.h"' > test.c # cc -I/usr/local/include -pedantic -Wall -Wextra -c test.c In file included from test.c:1: /usr/local/include/ldns/error.h:130: warning: comma at end of enumerator list These are consistent. However, when looking at what happens on Ubuntu: ... Using system include syntax makes it quiet: # echo '#include <ldns/error.h>' > test.c # cc -pedantic -Wall -Wextra -c test.c ... while including the file directly causes a warning: # echo '#include "/usr/include/ldns/error.h"' > test.c # cc -pedantic -Wall -Wextra -c test.c In file included from test.c:1:0: /usr/include/ldns/error.h:129:28: warning: comma at end of enumerator list [-Wpedantic] LDNS_STATUS_RDATA_OVERFLOW, ^ I'm guessing this is the reason it is not spotted as easily on Linux. What I wonder is if anyone here has struggled with a similar problem and if there is a good solution for it. Regards, Patrik Lundin