]> granicus.if.org Git - libevent/commitdiff
Make the headers compile happily with pedantic C compilers.
authorNick Mathewson <nickm@torproject.org>
Thu, 28 May 2009 15:58:28 +0000 (15:58 +0000)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 May 2009 15:58:28 +0000 (15:58 +0000)
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
include/event2/event.h

index 1c4698727c9b827e3c0ffb228f0571a740c6a643..b0e2395bef72069b1e71d68e88f098daa52935e4 100644 (file)
@@ -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
 };
 
 /**
index 61e23a588a8fbeb7cf124f3c36abd21b02c4d60c..6fe5ff5ae16fa56e11524e71415903a2862ba9d5 100644 (file)
@@ -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
 };
 
 /**