Use void casts to suppress some "unchecked return value" warns

This commit is contained in:
Nick Mathewson 2013-08-06 19:28:53 -04:00
parent 44b2491bcd
commit 7080d55c49
3 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ read_cb(evutil_socket_t fd, short which, void *arg)
if (writes) {
if (widx >= num_pipes)
widx -= num_pipes;
send(pipes[2 * widx + 1], "e", 1, 0);
(void) send(pipes[2 * widx + 1], "e", 1, 0);
writes--;
fired++;
}
@ -102,7 +102,7 @@ run_once(void)
space = num_pipes / num_active;
space = space * 2;
for (i = 0; i < num_active; i++, fired++)
send(pipes[i * space + 1], "e", 1, 0);
(void) send(pipes[i * space + 1], "e", 1, 0);
count = 0;
writes = num_writes;

View File

@ -69,7 +69,7 @@ read_cb(evutil_socket_t fd, short which, void *arg)
char ch;
evutil_socket_t sock = (evutil_socket_t)(ev_intptr_t)arg;
recv(fd, &ch, sizeof(ch), 0);
(void) recv(fd, &ch, sizeof(ch), 0);
if (sock >= 0) {
if (send(sock, "e", 1, 0) < 0)
perror("send");

View File

@ -1573,7 +1573,7 @@ static void send_a_byte_cb(evutil_socket_t fd, short what, void *arg)
{
evutil_socket_t *sockp = arg;
(void) fd; (void) what;
write(*sockp, "A", 1);
(void) write(*sockp, "A", 1);
}
struct read_not_timeout_param
{
@ -1586,7 +1586,7 @@ static void read_not_timeout_cb(evutil_socket_t fd, short what, void *arg)
struct read_not_timeout_param *rntp = arg;
char c;
(void) fd; (void) what;
read(fd, &c, 1);
(void) read(fd, &c, 1);
rntp->events |= what;
++rntp->count;
if(2 == rntp->count) event_del(rntp->ev[0]);