Commit c896c8f8 authored by Vysheng's avatar Vysheng

Added attribute unused

parent 49b5a263
...@@ -9,7 +9,7 @@ install: ...@@ -9,7 +9,7 @@ install:
- sudo apt-get install libreadline6-dev - sudo apt-get install libreadline6-dev
- sudo apt-get install libssl-dev - sudo apt-get install libssl-dev
- sudo apt-get install liblua5.2-dev lua5.2 - 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: script:
- ./configure - ./configure
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
typedef int evutil_socket_t; 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) { 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)); struct event *ev = malloc (sizeof (*ev));
event_set (ev, fd, what, callback, arg); 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 ...@@ -10,6 +11,7 @@ static inline struct event *event_new (struct event_base *base, int fd, int what
return ev; 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) { static inline struct event *evtimer_new (struct event_base *base, void(*callback)(int, short, void *), void *arg) {
struct event *ev = malloc (sizeof (*ev)); struct event *ev = malloc (sizeof (*ev));
event_set (ev, -1, 0, callback, arg); event_set (ev, -1, 0, callback, arg);
...@@ -17,6 +19,7 @@ static inline struct event *evtimer_new (struct event_base *base, void(*callback ...@@ -17,6 +19,7 @@ static inline struct event *evtimer_new (struct event_base *base, void(*callback
return ev; return ev;
} }
static void event_free (struct event *ev) __attribute__ ((unused));
static void event_free (struct event *ev) { static void event_free (struct event *ev) {
event_del (ev); event_del (ev);
free (ev); free (ev);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment