diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2022-12-14 08:04:51 -0600 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2022-12-14 08:04:51 -0600 |
commit | 5e0418d120dbff81325bd20bb575c09e550023a5 (patch) | |
tree | 3265384d5cacef2da3639c5965d422dd9152d7f3 /ACE | |
parent | 8038e3e754d1307c2d465f3029909fd4f7b27a1b (diff) | |
download | ATCD-5e0418d120dbff81325bd20bb575c09e550023a5.tar.gz |
Pulled in changes from ACE 7.
Diffstat (limited to 'ACE')
-rw-r--r-- | ACE/ACEXML/parser/parser/Parser.cpp | 10 | ||||
-rw-r--r-- | ACE/ace/OS_NS_string.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/Process.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/Process_Manager.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/config-macros.h | 11 |
5 files changed, 26 insertions, 7 deletions
diff --git a/ACE/ACEXML/parser/parser/Parser.cpp b/ACE/ACEXML/parser/parser/Parser.cpp index 385ba540c55..687fcd11531 100644 --- a/ACE/ACEXML/parser/parser/Parser.cpp +++ b/ACE/ACEXML/parser/parser/Parser.cpp @@ -181,6 +181,7 @@ ACEXML_Parser::parse (ACEXML_InputSource *input) break; case 0: this->fatal_error (ACE_TEXT ("Unexpected end-of-file")); + break; default: // Root element begins prolog_done = 1; break; @@ -541,6 +542,7 @@ ACEXML_Parser::parse_includesect (void) case 0: // [VC: Proper Conditional Section/PE Nesting] this->fatal_error (ACE_TEXT ("Invalid Conditional Section/PE ") ACE_TEXT ("Nesting ")); + break; case ']': if (this->peek() == ']') { @@ -551,6 +553,7 @@ ACEXML_Parser::parse_includesect (void) return 0; } } + ACE_FALLTHROUGH; default: this->fatal_error (ACE_TEXT ("Invalid includeSect")); } @@ -596,6 +599,7 @@ ACEXML_Parser::parse_markup_decl (void) break; case 0: // [VC: Proper Declaration/PE Nesting] this->fatal_error (ACE_TEXT ("Unexpected end-of-file")); + break; default: this->fatal_error (ACE_TEXT ("Invalid markupDecl")); } @@ -989,7 +993,7 @@ ACEXML_Parser::parse_content (const ACEXML_Char* startname, // cdata_length = 0; // break; // } - // Fall thru... + ACE_FALLTHROUGH; default: ++cdata_length; this->obstack_.grow (ch); @@ -1368,6 +1372,7 @@ ACEXML_Parser::parse_tokenized_type (void) // Admittedly, this error message is not precise enough this->fatal_error(ACE_TEXT ("Expecting keyword `ID', `IDREF', or") ACE_TEXT ("`IDREFS'")); + break; case 'E': // ENTITY or ENTITIES if (this->parse_token (ACE_TEXT ("NTIT")) == 0) { @@ -1393,6 +1398,7 @@ ACEXML_Parser::parse_tokenized_type (void) // Admittedly, this error message is not precise enough this->fatal_error(ACE_TEXT ("Expecting keyword `ENTITY', or") ACE_TEXT ("`ENTITIES'")); + break; case 'M': if (this->parse_token (ACE_TEXT ("TOKEN")) == 0) { @@ -2854,7 +2860,7 @@ ACEXML_Parser::parse_processing_instruction (void) } break; case 0x0A: - // Fall thru... + ACE_FALLTHROUGH; default: if (state == 1) this->obstack_.grow ('?'); diff --git a/ACE/ace/OS_NS_string.cpp b/ACE/ace/OS_NS_string.cpp index ff5c4e1e549..03a91a45f2c 100644 --- a/ACE/ace/OS_NS_string.cpp +++ b/ACE/ace/OS_NS_string.cpp @@ -83,9 +83,9 @@ ACE_OS::strerror (int errnum) if (ACE::is_sock_error (errnum)) { const ACE_TCHAR *errortext = ACE::sock_error (errnum); - ACE_OS::strncpy (ret_errortext, - ACE_TEXT_ALWAYS_CHAR (errortext), - sizeof (ret_errortext)); + ACE_OS::strsncpy (ret_errortext, + ACE_TEXT_ALWAYS_CHAR (errortext), + sizeof (ret_errortext)); return ret_errortext; } #if defined (ACE_LACKS_STRERROR) diff --git a/ACE/ace/Process.cpp b/ACE/ace/Process.cpp index a1921102960..10500483e30 100644 --- a/ACE/ace/Process.cpp +++ b/ACE/ace/Process.cpp @@ -695,7 +695,8 @@ ACE_Process::wait (const ACE_Time_Value &tv, // open(), and there's already a SIGCHLD action set, so no // action is needed here. ACE_Sig_Action old_action; - ACE_Sig_Action do_sigchld ((ACE_SignalHandler)sigchld_nop); + ACE_Sig_Handler_Ex sigchld_nop_ptr = sigchld_nop; + ACE_Sig_Action do_sigchld (reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> (sigchld_nop_ptr))); do_sigchld.register_action (SIGCHLD, &old_action); pid_t pid; diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp index 4db0f020eed..6a609cb8dc0 100644 --- a/ACE/ace/Process_Manager.cpp +++ b/ACE/ace/Process_Manager.cpp @@ -888,7 +888,8 @@ ACE_Process_Manager::wait (pid_t pid, ACE_Sig_Action old_action; if (this->reactor () == 0) { - ACE_Sig_Action do_sigchld ((ACE_SignalHandler)sigchld_nop); + ACE_Sig_Handler_Ex sigchld_nop_ptr = sigchld_nop; + ACE_Sig_Action do_sigchld (reinterpret_cast<ACE_SignalHandler> (reinterpret_cast<void*> (sigchld_nop_ptr))); do_sigchld.register_action (SIGCHLD, &old_action); } diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 5989d2cc6d8..c1aef4c1f08 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -277,6 +277,17 @@ # define ACE_NOTREACHED(a) a #endif /* ghs || ..... */ + +// Compiler-specific configs can define ACE_FALLTHROUGH but if not, +// and it's a C++17 or higher compiler, use the defined mechanism. +#if !defined ACE_FALLTHROUGH +# if defined ACE_HAS_CPP17 +# define ACE_FALLTHROUGH [[fallthrough]] +# else +# define ACE_FALLTHROUGH +# endif /* ACE_HAS_CPP17 */ +#endif /* ACE_FALLTHROUGH */ + // ============================================================================ // ACE_ALLOC_HOOK* macros // |