This is due to differences between C compilers. gcc 4.8 and clang don't warn for this with -pedantic, gcc 4.2.1 does.
I think -pedantic is fairly pointless in ports and should be removed, but I would also report it to nlnetlabs as an ldns bug, I think the best approach would be to remove the surplus , for better compiler compatibility (and their other enums don't have a trailing ,). https://www.nlnetlabs.nl/bugs-script/buglist.cgi?product=ldns&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&cmdtype=doit $ for i in clang egcc cc; do echo ===== $i; $i --version | head -1; $i -I /usr/local/include -pedantic -Wall -Wextra -c test ===== clang clang version 3.5 (trunk) ===== egcc egcc (GCC) 4.8.2 ===== cc cc (GCC) 4.2.1 20070719 In file included from test.c:1: /usr/local/include/ldns/error.h:130: warning: comma at end of enumerator list On 2014/05/18 11:43, Patrik Lundin wrote: > 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 >