Added attribute unused

This commit is contained in:
Vysheng 2014-09-08 17:02:59 +04:00
parent 49b5a2635f
commit c896c8f835
2 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,7 @@ install:
- sudo apt-get install libreadline6-dev
- sudo apt-get install libssl-dev
- sudo apt-get install liblua5.2-dev lua5.2
- sudo apt-get install libevent-dev=1.4.13-stable-1
- sudo apt-get install libevent-dev
script:
- ./configure

View File

@ -3,6 +3,7 @@
typedef int evutil_socket_t;
static inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));
static inline struct event *event_new (struct event_base *base, int fd, int what, void(*callback)(int, short, void *), void *arg) {
struct event *ev = malloc (sizeof (*ev));
event_set (ev, fd, what, callback, arg);
@ -10,6 +11,7 @@ static inline struct event *event_new (struct event_base *base, int fd, int what
return ev;
}
static inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) __attribute__ ((unused));
static inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) {
struct event *ev = malloc (sizeof (*ev));
event_set (ev, -1, 0, callback, arg);
@ -17,6 +19,7 @@ static inline struct event *evtimer_new (struct event_base *base, void(*callback
return ev;
}
static void event_free (struct event *ev) __attribute__ ((unused));
static void event_free (struct event *ev) {
event_del (ev);
free (ev);