summaryrefslogtreecommitdiff
path: root/src/Fl_lock.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-10-28 18:02:20 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-10-28 18:02:20 +0000
commit291faee430b13248a1b97e1ef254b9a468a67ad1 (patch)
treeff6f7a61ff69000fe2b0c25b71d16bbc1ee2bb3a /src/Fl_lock.cxx
parent58bdfbdedd56582d4ed835018494dc21dc605f40 (diff)
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
Diffstat (limited to 'src/Fl_lock.cxx')
-rw-r--r--src/Fl_lock.cxx10
1 files changed, 7 insertions, 3 deletions
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)