From eb97bb76e1a99eed4850f78421392f4765c63a73 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 28 May 2009 15:58:28 +0000 Subject: [PATCH] Make the headers compile happily with pedantic C compilers. Original message from SF patch 2797966: While commas at the end of enumerator lists are valid in c99, they are not valid +in c89 nor in c++. When using gcc/g++ with the -pedantic flag, users will +receive a warning (gcc) or an error(g++) when including the event2/event.h and +event2/bufferevent.h. The errors look something like event2/event.h:159: error: comma at end of enumerator list Patch from Akita Noek on Sourceforge. svn:r1321 --- include/event2/bufferevent.h | 4 ++-- include/event2/event.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h index 1c469872..b0e2395b 100644 --- a/include/event2/bufferevent.h +++ b/include/event2/bufferevent.h @@ -126,7 +126,7 @@ enum bufferevent_options { BEV_OPT_THREADSAFE = (1<<1), /** If set, callbacks are run deferred in the event loop. */ - BEV_OPT_DEFER_CALLBACKS = (1<<2), + BEV_OPT_DEFER_CALLBACKS = (1<<2) }; /** @@ -366,7 +366,7 @@ enum bufferevent_flush_mode { BEV_FLUSH = 1, /** encountered EOF on read or done sending data */ - BEV_FINISHED = 2, + BEV_FINISHED = 2 }; /** diff --git a/include/event2/event.h b/include/event2/event.h index 61e23a58..6fe5ff5a 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -156,7 +156,7 @@ enum event_method_feature { EV_FEATURE_O1 = 0x02, /* Require an event method that allows file descriptors as well as * sockets. */ - EV_FEATURE_FDS = 0x04, + EV_FEATURE_FDS = 0x04 }; enum event_base_config_flag { @@ -165,7 +165,7 @@ enum event_base_config_flag { EVENT_BASE_FLAG_NOLOCK = 0x01, /** Do not check the EVENT_NO* environment variables when picking an event_base. */ - EVENT_BASE_FLAG_IGNORE_ENV = 0x02, + EVENT_BASE_FLAG_IGNORE_ENV = 0x02 }; /** -- 2.50.1