about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-22 19:27:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-22 19:27:32 -0700
commita6defa547ada58b14e0061fe73040a5fdd772b42 (patch)
tree2e0543ad46c30a1c5711fbdb764023577a8a7219
parent75cbfa2899fd47bc638095b425ee9142a12ce7ef (diff)
downloadmu-a6defa547ada58b14e0061fe73040a5fdd772b42.tar.gz
1138 - fix some termbox warnings
-rw-r--r--cpp/termbox/bytebuffer.inl3
-rw-r--r--cpp/termbox/termbox.c7
2 files changed, 7 insertions, 3 deletions
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 <fcntl.h>
 #include <signal.h>
 #include <stdio.h>
+int snprintf(char *str, size_t size, const char *format, ...);  // until we enable gnu99
 #include <stdbool.h>
 #include <sys/ioctl.h>
 #include <sys/time.h>
@@ -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;