From 291faee430b13248a1b97e1ef254b9a468a67ad1 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 28 Oct 2010 18:02:20 +0000 Subject: Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis missing to make the precedence of && over || obvious. Ah well, why not... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_lock.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Fl_lock.cxx') diff --git a/src/Fl_lock.cxx b/src/Fl_lock.cxx index 27787cd99..39d9a8368 100644 --- a/src/Fl_lock.cxx +++ b/src/Fl_lock.cxx @@ -304,7 +304,7 @@ static void unlock_function_rec() { # endif // PTHREAD_MUTEX_RECURSIVE void Fl::awake(void* msg) { - write(thread_filedes[1], &msg, sizeof(void*)); + if (write(thread_filedes[1], &msg, sizeof(void*))==0) { /* ignore */ } } static void* thread_message_; @@ -315,7 +315,9 @@ void* Fl::thread_message() { } static void thread_awake_cb(int fd, void*) { - read(fd, &thread_message_, sizeof(void*)); + if (read(fd, &thread_message_, sizeof(void*))==0) { + /* This should never happen */ + } Fl_Awake_Handler func; void *data; while (Fl::get_awake_handler_(func, data)==0) { @@ -331,7 +333,9 @@ void Fl::lock() { if (!thread_filedes[1]) { // Initialize thread communication pipe to let threads awake FLTK // from Fl::wait() - pipe(thread_filedes); + if (pipe(thread_filedes)==-1) { + /* this should not happen */ + } // Make the write side of the pipe non-blocking to avoid deadlock // conditions (STR #1537) -- cgit v1.2.3