mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-15 15:25:09 -04:00
Fix unused-variable warning when building with threads disabled
This commit is contained in:
parent
dcdae6b743
commit
ad811cdc2b
@ -352,6 +352,10 @@ int _bufferevent_generic_adj_timeouts(struct bufferevent *bev);
|
|||||||
* bufferevent_private. */
|
* bufferevent_private. */
|
||||||
#define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
|
#define BEV_UPCAST(b) EVUTIL_UPCAST((b), struct bufferevent_private, bev)
|
||||||
|
|
||||||
|
#ifdef _EVENT_DISABLE_THREAD_SUPPORT
|
||||||
|
#define BEV_LOCK(b) _EVUTIL_NIL_STMT
|
||||||
|
#define BEV_UNLOCK(b) _EVUTIL_NIL_STMT
|
||||||
|
#else
|
||||||
/** Internal: Grab the lock (if any) on a bufferevent */
|
/** Internal: Grab the lock (if any) on a bufferevent */
|
||||||
#define BEV_LOCK(b) do { \
|
#define BEV_LOCK(b) do { \
|
||||||
struct bufferevent_private *locking = BEV_UPCAST(b); \
|
struct bufferevent_private *locking = BEV_UPCAST(b); \
|
||||||
@ -363,6 +367,8 @@ int _bufferevent_generic_adj_timeouts(struct bufferevent *bev);
|
|||||||
struct bufferevent_private *locking = BEV_UPCAST(b); \
|
struct bufferevent_private *locking = BEV_UPCAST(b); \
|
||||||
EVLOCK_UNLOCK(locking->lock, 0); \
|
EVLOCK_UNLOCK(locking->lock, 0); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* ==== For rate-limiting. */
|
/* ==== For rate-limiting. */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user