From 9c94ac312e62b201b6af1cd86bab0c7f891009d5 Mon Sep 17 00:00:00 2001 From: Christopher Rienzo Date: Fri, 8 Jun 2012 18:12:33 +0000 Subject: [PATCH] Fix Ubuntu 11.10 compiler error on unchecked write() return value. --- src/mod/timers/mod_posix_timer/mod_posix_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/timers/mod_posix_timer/mod_posix_timer.c b/src/mod/timers/mod_posix_timer/mod_posix_timer.c index cfb6584701..3d33b864db 100644 --- a/src/mod/timers/mod_posix_timer/mod_posix_timer.c +++ b/src/mod/timers/mod_posix_timer/mod_posix_timer.c @@ -113,7 +113,9 @@ static void timer_signal_handler(int sig, siginfo_t *si, void *cu) if (val >= 0 && val <= MAX_ACTIVE_TIMERS) { uint8_t active_id = (uint8_t)val; /* notify runtime thread that timer identified by active_id has ticked */ - write(globals.timer_tick_pipe[1], &active_id, 1); + if (write(globals.timer_tick_pipe[1], &active_id, 1) == -1) { + /* don't actually care about this error- this is only to make the compiler happy */ + } } } }