From ec94256f65a4d34e90a8ee1923f5e8b433764036 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sat, 27 Mar 2021 16:25:21 +0100 Subject: Fixed compile warnings * ACE/apps/drwho/Options.h: * ACE/tests/Proactor_Test_IPV6.cpp: * ACE/tests/SOCK_Send_Recv_Test.cpp: * ACE/tests/SOCK_Test.cpp: * ACE/tests/Sendfile_Test.cpp: --- ACE/apps/drwho/Options.h | 2 +- ACE/tests/Proactor_Test_IPV6.cpp | 9 ++------- ACE/tests/SOCK_Send_Recv_Test.cpp | 4 ++-- ACE/tests/SOCK_Test.cpp | 4 ++-- ACE/tests/Sendfile_Test.cpp | 4 ++-- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ACE/apps/drwho/Options.h b/ACE/apps/drwho/Options.h index c2a42bb0732..f8d60f68b8d 100644 --- a/ACE/apps/drwho/Options.h +++ b/ACE/apps/drwho/Options.h @@ -57,7 +57,7 @@ public: static const char *friend_file; static char *user_name; - static void print_usage_and_die (int long_msg); + static void print_usage_and_die [[noreturn]] (int long_msg); static unsigned int option_word; }; diff --git a/ACE/tests/Proactor_Test_IPV6.cpp b/ACE/tests/Proactor_Test_IPV6.cpp index c76eb0b62c9..c4e2adb050d 100644 --- a/ACE/tests/Proactor_Test_IPV6.cpp +++ b/ACE/tests/Proactor_Test_IPV6.cpp @@ -57,7 +57,6 @@ #include "Proactor_Test.h" - // Proactor Type (UNIX only, Win32 ignored) using ProactorType = enum { DEFAULT = 0, AIOCB, SIG, SUN, CB }; static ProactorType proactor_type = DEFAULT; @@ -104,12 +103,11 @@ static char complete_message[] = class LogLocker { public: - LogLocker () { ACE_LOG_MSG->acquire (); } virtual ~LogLocker () { ACE_LOG_MSG->release (); } }; - +#if defined (ACE_HAS_IPV6) // Function to remove signals from the signal mask. static int @@ -145,7 +143,6 @@ disable_signal (int sigmin, int sigmax) return 0; } - // ************************************************************* // MyTask is ACE_Task resposible for : // 1. creation and deletion of @@ -191,7 +188,6 @@ private: ACE_SYNCH_RECURSIVE_MUTEX lock_; ACE_Thread_Semaphore sem_; ACE_Proactor * proactor_; - }; int @@ -357,7 +353,7 @@ MyTask::svc () ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) MyTask finished\n"))); return 0; } - +#endif /* ACE_HAS_IPV6 */ // TestData collects and reports on test-related transfer and connection // statistics. @@ -617,7 +613,6 @@ TestData::report () ACE_TEXT ("really do anything. Something is very wrong.\n"))); } - class Acceptor : public ACE_Asynch_Acceptor { public: diff --git a/ACE/tests/SOCK_Send_Recv_Test.cpp b/ACE/tests/SOCK_Send_Recv_Test.cpp index 587750e5f66..045ee1077ad 100644 --- a/ACE/tests/SOCK_Send_Recv_Test.cpp +++ b/ACE/tests/SOCK_Send_Recv_Test.cpp @@ -397,10 +397,10 @@ spawn () { case -1: ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("fork failed"), 1)); - /* NOTREACHED */ + ACE_OS::abort (); case 0: ACE_LOG_MSG->sync (ACE_TEXT ("SOCK_Send_Recv_Test-child")); client (&server_addr); diff --git a/ACE/tests/SOCK_Test.cpp b/ACE/tests/SOCK_Test.cpp index a283827c9d2..0235a6b9123 100644 --- a/ACE/tests/SOCK_Test.cpp +++ b/ACE/tests/SOCK_Test.cpp @@ -202,10 +202,10 @@ spawn () { case -1: ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("fork failed"), 1)); - /* NOTREACHED */ + ACE_OS::abort (); case 0: client (&server_addr); ACE_OS::exit (0); diff --git a/ACE/tests/Sendfile_Test.cpp b/ACE/tests/Sendfile_Test.cpp index 73ad0224c49..153d256f67e 100644 --- a/ACE/tests/Sendfile_Test.cpp +++ b/ACE/tests/Sendfile_Test.cpp @@ -287,10 +287,10 @@ spawn () { case -1: ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n%a"), + ACE_TEXT ("(%P|%t) %p\n"), ACE_TEXT ("fork failed"), 1)); - /* NOTREACHED */ + ACE_OS::abort (); case 0: client (&server_addr); ACE_OS::exit (0); -- cgit v1.2.1