mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
test: check return value of write()/send() in bufferevent_read_failed
This will also suppress: ../test/regress_bufferevent.c: In function ‘test_bufferevent_read_failed’: 1102 ../test/regress_bufferevent.c:1395:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] 1103 write(data->pair[0], buf, strlen(buf));
This commit is contained in:
parent
04fcd7c6df
commit
f89e86123c
@ -1390,9 +1390,9 @@ test_bufferevent_read_failed(void *arg)
|
||||
tt_assert(bev != NULL);
|
||||
|
||||
#ifdef _WIN32
|
||||
send(data->pair[0], buf, strlen(buf), 0);
|
||||
tt_int_op(send(data->pair[0], buf, strlen(buf), 0), ==, strlen(buf));
|
||||
#else
|
||||
write(data->pair[0], buf, strlen(buf));
|
||||
tt_int_op(write(data->pair[0], buf, strlen(buf)), ==, strlen(buf));
|
||||
#endif
|
||||
event_base_dispatch(data->base);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user