summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-01-25 07:23:34 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-01-25 07:23:34 +0000
commit8c16b9c62ad1c52d76bc9643faeab12cd1b026dd (patch)
tree810fb56d4f3014b9a7c9a28d720c826130e104b2
parent0b09fd3e9167443b9c55fb1f95691bf3ca48992b (diff)
downloadATCD-8c16b9c62ad1c52d76bc9643faeab12cd1b026dd.tar.gz
ChangeLogTag:Mon Jan 24 23:10:33 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r--ChangeLog9
-rw-r--r--ace/Process_Manager.cpp8
-rw-r--r--ace/Signal.cpp4
-rw-r--r--ace/Thread_Manager.cpp52
4 files changed, 40 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 49b25b9dc68..2c640f9fdfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Mon Jan 24 23:10:33 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
+
+ * ace/Process_Manager.cpp (terminate):
+ * ace/Signal.cpp (remove_handler, register_handler):
+ * ace/Thread_Manager.cpp (spawn_i):
+
+ Fixed "control reaches end of non-void function" warnings
+ exhibited by the latest GNU G++ 4.0 CVS snapshot.
+
Mon Jan 24 17:00:39 2005 J.T. Conklin <jtc@acorntoolworks.com>
* ace/Makefile.am:
diff --git a/ace/Process_Manager.cpp b/ace/Process_Manager.cpp
index 4aa30ef5c5d..9046f69011c 100644
--- a/ace/Process_Manager.cpp
+++ b/ace/Process_Manager.cpp
@@ -606,13 +606,13 @@ ACE_Process_Manager::terminate (pid_t pid)
// Check for duplicates and bail out if they're already
// registered...
- ssize_t i = this->find_proc (pid);
+ ssize_t const i = this->find_proc (pid);
if (i == -1)
// set "no such process" error
return -1;
- int result = ACE::terminate_process (pid);
+ int const result = ACE::terminate_process (pid);
if (result != -1)
{
@@ -621,8 +621,8 @@ ACE_Process_Manager::terminate (pid_t pid)
this->remove_proc (i);
return 0;
}
- else
- return -1;
+
+ return -1;
}
int
diff --git a/ace/Signal.cpp b/ace/Signal.cpp
index 0978b21fad3..8e7763940c3 100644
--- a/ace/Signal.cpp
+++ b/ace/Signal.cpp
@@ -697,8 +697,8 @@ ACE_Sig_Handlers::register_handler (int signum,
return ace_sig_adapter->sigkey ();
}
}
- else
- return -1;
+
+ return -1;
}
// Remove the ACE_Event_Handler currently associated with <signum>.
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index 4669856de3d..e4511fdb00c 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -630,40 +630,38 @@ ACE_Thread_Manager::spawn_i (ACE_THR_FUNC func,
new_thr_desc->sync_->release ();
return -1;
}
- else
- {
+
#if defined (ACE_HAS_WTHREADS)
- // Have to duplicate handle if client asks for it.
- // @@ How are thread handles implemented on AIX? Do they
- // also need to be duplicated?
- if (t_handle != 0)
+ // Have to duplicate handle if client asks for it.
+ // @@ How are thread handles implemented on AIX? Do they
+ // also need to be duplicated?
+ if (t_handle != 0)
# if defined (ACE_HAS_WINCE)
- *t_handle = thr_handle;
+ *t_handle = thr_handle;
# else /* ! ACE_HAS_WINCE */
- (void) ::DuplicateHandle (::GetCurrentProcess (),
- thr_handle,
- ::GetCurrentProcess (),
- t_handle,
- 0,
- TRUE,
- DUPLICATE_SAME_ACCESS);
+ (void) ::DuplicateHandle (::GetCurrentProcess (),
+ thr_handle,
+ ::GetCurrentProcess (),
+ t_handle,
+ 0,
+ TRUE,
+ DUPLICATE_SAME_ACCESS);
# endif /* ! ACE_HAS_WINCE */
#else /* ! ACE_HAS_WTHREADS */
- if (t_handle != 0)
- *t_handle = thr_handle;
+ if (t_handle != 0)
+ *t_handle = thr_handle;
#endif /* ! ACE_HAS_WTHREADS && ! VXWORKS */
- // append_thr also put the <new_thr_desc> into Thread_Manager's
- // double-linked list. Only after this point, can we manipulate
- // double-linked list from a spawned thread's context.
- return this->append_thr (*t_id,
- thr_handle,
- ACE_THR_SPAWNED,
- grp_id,
- task,
- flags,
- new_thr_desc.release ());
- }
+ // append_thr also put the <new_thr_desc> into Thread_Manager's
+ // double-linked list. Only after this point, can we manipulate
+ // double-linked list from a spawned thread's context.
+ return this->append_thr (*t_id,
+ thr_handle,
+ ACE_THR_SPAWNED,
+ grp_id,
+ task,
+ flags,
+ new_thr_desc.release ());
}
int