From c695b2a3ee9c4f5e4d3f2e577efd665b9b147e94 Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 10 Nov 2005 05:01:26 +0000 Subject: [PATCH] Try the DUMY_ELEM=0 trick for suppressing the trailing "," that upsets some compilers when using -pedantic --- lib/gvc/gvplugin.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index 22be6dcb2..88530691b 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -45,7 +45,13 @@ extern "C" { #define APIS ELEM(render) ELEM(layout) ELEM(textlayout) ELEM(device) ELEM(usershape) #define ELEM(x) API_##x, - typedef enum { APIS } api_t; /* API_render, API_layout, ... */ + typedef enum { APIS DUMMY_ELEM=0 } api_t; /* API_render, API_layout, ... */ + /* Stupid but true:... The sole purpose of "DUMMY_ELEM=0" + * is to avoid a "," after the last element of the enum + * because some compilers when using "-pedantic" complain + * about the dangling "," ! Setting it to 0 makes sure + * that the enumeration does not define an extra value. + */ #undef ELEM typedef struct { -- 2.40.0