From a6defa547ada58b14e0061fe73040a5fdd772b42 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 22 Apr 2015 19:27:32 -0700 Subject: 1138 - fix some termbox warnings --- cpp/termbox/bytebuffer.inl | 3 ++- cpp/termbox/termbox.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'cpp') diff --git a/cpp/termbox/bytebuffer.inl b/cpp/termbox/bytebuffer.inl index c476742d..62e234c0 100644 --- a/cpp/termbox/bytebuffer.inl +++ b/cpp/termbox/bytebuffer.inl @@ -63,7 +63,8 @@ static void bytebuffer_resize(struct bytebuffer *b, int len) { } static void bytebuffer_flush(struct bytebuffer *b, int fd) { - write(fd, b->buf, b->len); + int yyy = write(fd, b->buf, b->len); + (void) yyy; bytebuffer_clear(b); } diff --git a/cpp/termbox/termbox.c b/cpp/termbox/termbox.c index c9a7ae5e..f32d8f07 100644 --- a/cpp/termbox/termbox.c +++ b/cpp/termbox/termbox.c @@ -5,6 +5,7 @@ #include #include #include +int snprintf(char *str, size_t size, const char *format, ...); // until we enable gnu99 #include #include #include @@ -580,7 +581,8 @@ static void sigwinch_handler(int xxx) { (void) xxx; const int zzz = 1; - write(winch_fds[1], &zzz, sizeof(int)); + int yyy = write(winch_fds[1], &zzz, sizeof(int)); + (void) yyy; } static void update_size(void) @@ -670,7 +672,8 @@ static int wait_fill_event(struct tb_event *event, struct timeval *timeout) if (FD_ISSET(winch_fds[0], &events)) { event->type = TB_EVENT_RESIZE; int zzz = 0; - read(winch_fds[0], &zzz, sizeof(int)); + int yyy = read(winch_fds[0], &zzz, sizeof(int)); + (void) yyy; buffer_size_change_request = 1; get_term_size(&event->w, &event->h); return TB_EVENT_RESIZE; -- cgit 1.4.1-2-gfad0