From c0e5e016cf7f01a2c9d1a37ca77795be1c9a5a10 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Mon, 9 Jun 2025 14:40:25 -0500 Subject: [PATCH 1/3] Merge pull request #2395 from mitza-oci/warnings Fixed warnings --- ACE/ace/Message_Queue_T.cpp | 14 +- TAO/TAO_IDL/be/be_codegen.cpp | 2 +- TAO/TAO_IDL/fe/idl.ll | 4 + TAO/TAO_IDL/fe/idl.yy.cpp | 262 +++++++++--------- .../orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp | 16 +- .../SSLIOP/SSLIOP_CredentialsAcquirer.cpp | 12 +- .../orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp | 23 +- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp | 12 +- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp | 19 +- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Util.cpp | 2 - 10 files changed, 179 insertions(+), 187 deletions(-) diff --git a/ACE/ace/Message_Queue_T.cpp b/ACE/ace/Message_Queue_T.cpp index 1b68b9af0ccd0..4b611ac8c0940 100644 --- a/ACE/ace/Message_Queue_T.cpp +++ b/ACE/ace/Message_Queue_T.cpp @@ -1324,7 +1324,7 @@ ACE_Message_Queue::enqueue_head_i (ACE_Message_Block if (this->signal_dequeue_waiters () == -1) return -1; else - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } // Actually put the node at its proper position relative to its @@ -1515,7 +1515,7 @@ ACE_Message_Queue::dequeue_head_i (ACE_Message_Block && this->signal_enqueue_waiters () == -1) return -1; else - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } // Get the earliest (i.e., FIFO) ACE_Message_Block with the lowest @@ -1591,7 +1591,7 @@ ACE_Message_Queue::dequeue_prio_i (ACE_Message_Block && this->signal_enqueue_waiters () == -1) return -1; else - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } // Actually get the last ACE_Message_Block (no locking, so must be @@ -1640,7 +1640,7 @@ ACE_Message_Queue::dequeue_tail_i (ACE_Message_Block && this->signal_enqueue_waiters () == -1) return -1; else - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } // Actually get the ACE_Message_Block with the lowest deadline time @@ -1735,7 +1735,7 @@ ACE_Message_Queue::peek_dequeue_head (ACE_Message_Bl return -1; first_item = this->head_; - return ACE_Utils::truncate_cast (static_cast (this->cur_count_)); + return static_cast (this->cur_count_); } template int @@ -2436,7 +2436,7 @@ ACE_Dynamic_Message_Queue::enqueue_i (ACE_Message_Bl } else { - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } } @@ -2636,7 +2636,7 @@ ACE_Dynamic_Message_Queue::dequeue_head_i (ACE_Messa } else { - return ACE_Utils::truncate_cast (this->cur_count_); + return static_cast (this->cur_count_); } } diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index e02cfc1f89441..ed95af063b7e8 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -3772,7 +3772,7 @@ TAO_CodeGen::make_rand_extension (char * const t) // Factor out the constant coefficient. float const coefficient = - static_cast (MAX_VAL / (static_cast (RAND_MAX) + 1.0f)); + static_cast (MAX_VAL / static_cast (RAND_MAX) + 1.0f); for (unsigned int n = 0; n < NUM_CHARS; ++n) { diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll index 5106455c0465b..34c92bba5a40d 100644 --- a/TAO/TAO_IDL/fe/idl.ll +++ b/TAO/TAO_IDL/fe/idl.ll @@ -112,6 +112,10 @@ static AST_Decl * idl_find_node (const char *); #undef ECHO #endif +#ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wmisleading-indentation" +#endif + %} /* SO we don't choke on files that use \r\n */ diff --git a/TAO/TAO_IDL/fe/idl.yy.cpp b/TAO/TAO_IDL/fe/idl.yy.cpp index f39523dd6aef9..cbd78d0f5d3c7 100644 --- a/TAO/TAO_IDL/fe/idl.yy.cpp +++ b/TAO/TAO_IDL/fe/idl.yy.cpp @@ -1450,9 +1450,13 @@ static AST_Decl * idl_find_node (const char *); #undef ECHO #endif -#line 1455 "fe/idl.yy.cpp" +#ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wmisleading-indentation" +#endif + +#line 1459 "fe/idl.yy.cpp" /* SO we don't choke on files that use \r\n */ -#line 1457 "fe/idl.yy.cpp" +#line 1461 "fe/idl.yy.cpp" #define INITIAL 0 @@ -1678,10 +1682,10 @@ YY_DECL } { -#line 123 "fe/idl.ll" +#line 127 "fe/idl.ll" -#line 1686 "fe/idl.yy.cpp" +#line 1690 "fe/idl.yy.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1746,182 +1750,182 @@ YY_DECL { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 125 "fe/idl.ll" +#line 129 "fe/idl.ll" return IDL_ANY; YY_BREAK case 2: YY_RULE_SETUP -#line 126 "fe/idl.ll" +#line 130 "fe/idl.ll" return IDL_OBJECT; YY_BREAK case 3: YY_RULE_SETUP -#line 127 "fe/idl.ll" +#line 131 "fe/idl.ll" return IDL_MODULE; YY_BREAK case 4: YY_RULE_SETUP -#line 128 "fe/idl.ll" +#line 132 "fe/idl.ll" return IDL_RAISES; YY_BREAK case 5: YY_RULE_SETUP -#line 129 "fe/idl.ll" +#line 133 "fe/idl.ll" return IDL_READONLY; YY_BREAK case 6: YY_RULE_SETUP -#line 130 "fe/idl.ll" +#line 134 "fe/idl.ll" return IDL_ATTRIBUTE; YY_BREAK case 7: YY_RULE_SETUP -#line 131 "fe/idl.ll" +#line 135 "fe/idl.ll" return IDL_EXCEPTION; YY_BREAK case 8: YY_RULE_SETUP -#line 132 "fe/idl.ll" +#line 136 "fe/idl.ll" return IDL_CONTEXT; YY_BREAK case 9: YY_RULE_SETUP -#line 133 "fe/idl.ll" +#line 137 "fe/idl.ll" return IDL_INTERFACE; YY_BREAK case 10: YY_RULE_SETUP -#line 134 "fe/idl.ll" +#line 138 "fe/idl.ll" return IDL_CONST; YY_BREAK case 11: YY_RULE_SETUP -#line 135 "fe/idl.ll" +#line 139 "fe/idl.ll" return IDL_TYPEDEF; YY_BREAK case 12: YY_RULE_SETUP -#line 136 "fe/idl.ll" +#line 140 "fe/idl.ll" return IDL_STRUCT; YY_BREAK case 13: YY_RULE_SETUP -#line 137 "fe/idl.ll" +#line 141 "fe/idl.ll" return IDL_ENUM; YY_BREAK case 14: YY_RULE_SETUP -#line 138 "fe/idl.ll" +#line 142 "fe/idl.ll" return IDL_STRING; YY_BREAK case 15: YY_RULE_SETUP -#line 139 "fe/idl.ll" +#line 143 "fe/idl.ll" return IDL_WSTRING; YY_BREAK case 16: YY_RULE_SETUP -#line 140 "fe/idl.ll" +#line 144 "fe/idl.ll" return IDL_SEQUENCE; YY_BREAK case 17: YY_RULE_SETUP -#line 141 "fe/idl.ll" +#line 145 "fe/idl.ll" return IDL_MAP; YY_BREAK case 18: YY_RULE_SETUP -#line 142 "fe/idl.ll" +#line 146 "fe/idl.ll" return IDL_UNION; YY_BREAK case 19: YY_RULE_SETUP -#line 143 "fe/idl.ll" +#line 147 "fe/idl.ll" return IDL_FIXED; YY_BREAK case 20: YY_RULE_SETUP -#line 144 "fe/idl.ll" +#line 148 "fe/idl.ll" return IDL_SWITCH; YY_BREAK case 21: YY_RULE_SETUP -#line 145 "fe/idl.ll" +#line 149 "fe/idl.ll" return IDL_CASE; YY_BREAK case 22: YY_RULE_SETUP -#line 146 "fe/idl.ll" +#line 150 "fe/idl.ll" return IDL_DEFAULT; YY_BREAK case 23: YY_RULE_SETUP -#line 147 "fe/idl.ll" +#line 151 "fe/idl.ll" return IDL_FLOAT; YY_BREAK case 24: YY_RULE_SETUP -#line 148 "fe/idl.ll" +#line 152 "fe/idl.ll" return IDL_DOUBLE; YY_BREAK case 25: YY_RULE_SETUP -#line 149 "fe/idl.ll" +#line 153 "fe/idl.ll" return IDL_LONG; YY_BREAK case 26: YY_RULE_SETUP -#line 150 "fe/idl.ll" +#line 154 "fe/idl.ll" return IDL_SHORT; YY_BREAK case 27: YY_RULE_SETUP -#line 151 "fe/idl.ll" +#line 155 "fe/idl.ll" return IDL_UNSIGNED; YY_BREAK case 28: YY_RULE_SETUP -#line 152 "fe/idl.ll" +#line 156 "fe/idl.ll" return IDL_CHAR; YY_BREAK case 29: YY_RULE_SETUP -#line 153 "fe/idl.ll" +#line 157 "fe/idl.ll" return IDL_WCHAR; YY_BREAK case 30: YY_RULE_SETUP -#line 154 "fe/idl.ll" +#line 158 "fe/idl.ll" return IDL_BOOLEAN; YY_BREAK case 31: YY_RULE_SETUP -#line 155 "fe/idl.ll" +#line 159 "fe/idl.ll" return IDL_OCTET; YY_BREAK case 32: YY_RULE_SETUP -#line 156 "fe/idl.ll" +#line 160 "fe/idl.ll" return IDL_VOID; YY_BREAK case 33: YY_RULE_SETUP -#line 157 "fe/idl.ll" +#line 161 "fe/idl.ll" return IDL_NATIVE; YY_BREAK case 34: YY_RULE_SETUP -#line 158 "fe/idl.ll" +#line 162 "fe/idl.ll" return IDL_LOCAL; YY_BREAK case 35: YY_RULE_SETUP -#line 159 "fe/idl.ll" +#line 163 "fe/idl.ll" return IDL_ABSTRACT; YY_BREAK case 36: YY_RULE_SETUP -#line 161 "fe/idl.ll" +#line 165 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_INT8; @@ -1933,7 +1937,7 @@ YY_RULE_SETUP YY_BREAK case 37: YY_RULE_SETUP -#line 169 "fe/idl.ll" +#line 173 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_UINT8; @@ -1945,7 +1949,7 @@ YY_RULE_SETUP YY_BREAK case 38: YY_RULE_SETUP -#line 177 "fe/idl.ll" +#line 181 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_INT16; @@ -1957,7 +1961,7 @@ YY_RULE_SETUP YY_BREAK case 39: YY_RULE_SETUP -#line 185 "fe/idl.ll" +#line 189 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_UINT16; @@ -1969,7 +1973,7 @@ YY_RULE_SETUP YY_BREAK case 40: YY_RULE_SETUP -#line 193 "fe/idl.ll" +#line 197 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_INT32; @@ -1981,7 +1985,7 @@ YY_RULE_SETUP YY_BREAK case 41: YY_RULE_SETUP -#line 201 "fe/idl.ll" +#line 205 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_UINT32; @@ -1993,7 +1997,7 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 209 "fe/idl.ll" +#line 213 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_INT64; @@ -2005,7 +2009,7 @@ YY_RULE_SETUP YY_BREAK case 43: YY_RULE_SETUP -#line 217 "fe/idl.ll" +#line 221 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_UINT64; @@ -2017,7 +2021,7 @@ YY_RULE_SETUP YY_BREAK case 44: YY_RULE_SETUP -#line 225 "fe/idl.ll" +#line 229 "fe/idl.ll" { if (idl_global->idl_version_ >= IDL_VERSION_4) return IDL_MAP; @@ -2029,197 +2033,197 @@ YY_RULE_SETUP YY_BREAK case 45: YY_RULE_SETUP -#line 234 "fe/idl.ll" +#line 238 "fe/idl.ll" return IDL_CUSTOM; YY_BREAK case 46: YY_RULE_SETUP -#line 235 "fe/idl.ll" +#line 239 "fe/idl.ll" return IDL_FACTORY; YY_BREAK case 47: YY_RULE_SETUP -#line 236 "fe/idl.ll" +#line 240 "fe/idl.ll" return IDL_PRIVATE; YY_BREAK case 48: YY_RULE_SETUP -#line 237 "fe/idl.ll" +#line 241 "fe/idl.ll" return IDL_PUBLIC; YY_BREAK case 49: YY_RULE_SETUP -#line 238 "fe/idl.ll" +#line 242 "fe/idl.ll" return IDL_SUPPORTS; YY_BREAK case 50: YY_RULE_SETUP -#line 239 "fe/idl.ll" +#line 243 "fe/idl.ll" return IDL_TRUNCATABLE; YY_BREAK case 51: YY_RULE_SETUP -#line 240 "fe/idl.ll" +#line 244 "fe/idl.ll" return IDL_VALUETYPE; YY_BREAK case 52: YY_RULE_SETUP -#line 242 "fe/idl.ll" +#line 246 "fe/idl.ll" return IDL_COMPONENT; YY_BREAK case 53: YY_RULE_SETUP -#line 243 "fe/idl.ll" +#line 247 "fe/idl.ll" return IDL_CONSUMES; YY_BREAK case 54: YY_RULE_SETUP -#line 244 "fe/idl.ll" +#line 248 "fe/idl.ll" return IDL_EMITS; YY_BREAK case 55: YY_RULE_SETUP -#line 245 "fe/idl.ll" +#line 249 "fe/idl.ll" return IDL_EVENTTYPE; YY_BREAK case 56: YY_RULE_SETUP -#line 246 "fe/idl.ll" +#line 250 "fe/idl.ll" return IDL_FINDER; YY_BREAK case 57: YY_RULE_SETUP -#line 247 "fe/idl.ll" +#line 251 "fe/idl.ll" return IDL_GETRAISES; YY_BREAK case 58: YY_RULE_SETUP -#line 248 "fe/idl.ll" +#line 252 "fe/idl.ll" return IDL_HOME; YY_BREAK case 59: YY_RULE_SETUP -#line 249 "fe/idl.ll" +#line 253 "fe/idl.ll" return IDL_IMPORT; YY_BREAK case 60: YY_RULE_SETUP -#line 250 "fe/idl.ll" +#line 254 "fe/idl.ll" return IDL_MULTIPLE; YY_BREAK case 61: YY_RULE_SETUP -#line 251 "fe/idl.ll" +#line 255 "fe/idl.ll" return IDL_PRIMARYKEY; YY_BREAK case 62: YY_RULE_SETUP -#line 252 "fe/idl.ll" +#line 256 "fe/idl.ll" return IDL_PROVIDES; YY_BREAK case 63: YY_RULE_SETUP -#line 253 "fe/idl.ll" +#line 257 "fe/idl.ll" return IDL_PUBLISHES; YY_BREAK case 64: YY_RULE_SETUP -#line 254 "fe/idl.ll" +#line 258 "fe/idl.ll" return IDL_SETRAISES; YY_BREAK case 65: YY_RULE_SETUP -#line 255 "fe/idl.ll" +#line 259 "fe/idl.ll" return IDL_TYPEID; YY_BREAK case 66: YY_RULE_SETUP -#line 256 "fe/idl.ll" +#line 260 "fe/idl.ll" return IDL_TYPEPREFIX; YY_BREAK case 67: YY_RULE_SETUP -#line 257 "fe/idl.ll" +#line 261 "fe/idl.ll" return IDL_USES; YY_BREAK case 68: YY_RULE_SETUP -#line 258 "fe/idl.ll" +#line 262 "fe/idl.ll" return IDL_MANAGES; YY_BREAK case 69: YY_RULE_SETUP -#line 260 "fe/idl.ll" +#line 264 "fe/idl.ll" return IDL_TYPENAME; YY_BREAK case 70: YY_RULE_SETUP -#line 261 "fe/idl.ll" +#line 265 "fe/idl.ll" return IDL_PORT; YY_BREAK case 71: YY_RULE_SETUP -#line 262 "fe/idl.ll" +#line 266 "fe/idl.ll" return IDL_MIRRORPORT; YY_BREAK case 72: YY_RULE_SETUP -#line 263 "fe/idl.ll" +#line 267 "fe/idl.ll" return IDL_PORTTYPE; YY_BREAK case 73: YY_RULE_SETUP -#line 264 "fe/idl.ll" +#line 268 "fe/idl.ll" return IDL_CONNECTOR; YY_BREAK case 74: YY_RULE_SETUP -#line 265 "fe/idl.ll" +#line 269 "fe/idl.ll" return IDL_ALIAS; YY_BREAK case 75: YY_RULE_SETUP -#line 267 "fe/idl.ll" +#line 271 "fe/idl.ll" return IDL_TRUETOK; YY_BREAK case 76: YY_RULE_SETUP -#line 268 "fe/idl.ll" +#line 272 "fe/idl.ll" return IDL_FALSETOK; YY_BREAK case 77: YY_RULE_SETUP -#line 270 "fe/idl.ll" +#line 274 "fe/idl.ll" return IDL_INOUT; YY_BREAK case 78: YY_RULE_SETUP -#line 271 "fe/idl.ll" +#line 275 "fe/idl.ll" return IDL_IN; YY_BREAK case 79: YY_RULE_SETUP -#line 272 "fe/idl.ll" +#line 276 "fe/idl.ll" return IDL_OUT; YY_BREAK case 80: YY_RULE_SETUP -#line 273 "fe/idl.ll" +#line 277 "fe/idl.ll" return IDL_ONEWAY; YY_BREAK case 81: YY_RULE_SETUP -#line 275 "fe/idl.ll" +#line 279 "fe/idl.ll" return IDL_LEFT_SHIFT; YY_BREAK case 82: YY_RULE_SETUP -#line 276 "fe/idl.ll" +#line 280 "fe/idl.ll" return IDL_RIGHT_SHIFT; YY_BREAK case 83: YY_RULE_SETUP -#line 277 "fe/idl.ll" +#line 281 "fe/idl.ll" { tao_yylval.strval = ACE::strnew ("::"); return IDL_SCOPE_DELIMITOR; @@ -2228,17 +2232,17 @@ YY_RULE_SETUP case 84: /* rule 84 can match eol */ YY_RULE_SETUP -#line 282 "fe/idl.ll" +#line 286 "fe/idl.ll" return IDL_ANNOTATION_DECL; // Allow annotation names that start with "annotation" YY_BREAK case 85: YY_RULE_SETUP -#line 283 "fe/idl.ll" +#line 287 "fe/idl.ll" return IDL_ANNOTATION_SYMBOL; YY_BREAK case 86: YY_RULE_SETUP -#line 285 "fe/idl.ll" +#line 289 "fe/idl.ll" { // Make sure that this identifier is not a C++ keyword. If it is, // prepend it with a _cxx_. Lookup in the perfect hash table for C++ @@ -2274,7 +2278,7 @@ YY_RULE_SETUP YY_BREAK case 87: YY_RULE_SETUP -#line 318 "fe/idl.ll" +#line 322 "fe/idl.ll" { tao_yylval.dval = idl_atof (ace_yytext); return IDL_FLOATING_PT_LITERAL; @@ -2282,7 +2286,7 @@ YY_RULE_SETUP YY_BREAK case 88: YY_RULE_SETUP -#line 322 "fe/idl.ll" +#line 326 "fe/idl.ll" { tao_yylval.dval = idl_atof (ace_yytext); return IDL_FLOATING_PT_LITERAL; @@ -2290,7 +2294,7 @@ YY_RULE_SETUP YY_BREAK case 89: YY_RULE_SETUP -#line 327 "fe/idl.ll" +#line 331 "fe/idl.ll" { tao_yylval.fixval = ACE_CDR::Fixed::from_string (ace_yytext); return IDL_FIXED_PT_LITERAL; @@ -2298,7 +2302,7 @@ YY_RULE_SETUP YY_BREAK case 90: YY_RULE_SETUP -#line 332 "fe/idl.ll" +#line 336 "fe/idl.ll" { tao_yylval.ival = idl_atoi (ace_yytext, 10); return IDL_INTEGER_LITERAL; @@ -2306,7 +2310,7 @@ YY_RULE_SETUP YY_BREAK case 91: YY_RULE_SETUP -#line 336 "fe/idl.ll" +#line 340 "fe/idl.ll" { tao_yylval.uival = idl_atoui (ace_yytext, 10); return IDL_UINTEGER_LITERAL; @@ -2314,7 +2318,7 @@ YY_RULE_SETUP YY_BREAK case 92: YY_RULE_SETUP -#line 340 "fe/idl.ll" +#line 344 "fe/idl.ll" { tao_yylval.ival = idl_atoi (ace_yytext, 16); return IDL_INTEGER_LITERAL; @@ -2322,7 +2326,7 @@ YY_RULE_SETUP YY_BREAK case 93: YY_RULE_SETUP -#line 344 "fe/idl.ll" +#line 348 "fe/idl.ll" { tao_yylval.uival = idl_atoui (ace_yytext, 16); return IDL_UINTEGER_LITERAL; @@ -2330,7 +2334,7 @@ YY_RULE_SETUP YY_BREAK case 94: YY_RULE_SETUP -#line 348 "fe/idl.ll" +#line 352 "fe/idl.ll" { tao_yylval.ival = idl_atoi (ace_yytext, 8); return IDL_INTEGER_LITERAL; @@ -2338,7 +2342,7 @@ YY_RULE_SETUP YY_BREAK case 95: YY_RULE_SETUP -#line 352 "fe/idl.ll" +#line 356 "fe/idl.ll" { tao_yylval.uival = idl_atoui (ace_yytext, 8); return IDL_UINTEGER_LITERAL; @@ -2347,7 +2351,7 @@ YY_RULE_SETUP case 96: /* rule 96 can match eol */ YY_RULE_SETUP -#line 357 "fe/idl.ll" +#line 361 "fe/idl.ll" { /* Skip the quotes */ char * const tmp = ace_yytext; @@ -2372,7 +2376,7 @@ YY_RULE_SETUP case 97: /* rule 97 can match eol */ YY_RULE_SETUP -#line 377 "fe/idl.ll" +#line 381 "fe/idl.ll" { /* Skip the bookends */ char * const tmp = ACE_OS::strdup (ace_yytext); @@ -2395,7 +2399,7 @@ YY_RULE_SETUP YY_BREAK case 98: YY_RULE_SETUP -#line 396 "fe/idl.ll" +#line 400 "fe/idl.ll" { tao_yylval.cval = ace_yytext[1]; return IDL_CHARACTER_LITERAL; @@ -2403,7 +2407,7 @@ YY_RULE_SETUP YY_BREAK case 99: YY_RULE_SETUP -#line 400 "fe/idl.ll" +#line 404 "fe/idl.ll" { // octal character constant tao_yylval.cval = idl_escape_reader (ace_yytext + 1); @@ -2412,7 +2416,7 @@ YY_RULE_SETUP YY_BREAK case 100: YY_RULE_SETUP -#line 405 "fe/idl.ll" +#line 409 "fe/idl.ll" { // hexadecimal character constant tao_yylval.cval = idl_escape_reader (ace_yytext + 1); @@ -2421,7 +2425,7 @@ YY_RULE_SETUP YY_BREAK case 101: YY_RULE_SETUP -#line 410 "fe/idl.ll" +#line 414 "fe/idl.ll" { tao_yylval.cval = idl_escape_reader (ace_yytext + 1); return IDL_CHARACTER_LITERAL; @@ -2429,7 +2433,7 @@ YY_RULE_SETUP YY_BREAK case 102: YY_RULE_SETUP -#line 414 "fe/idl.ll" +#line 418 "fe/idl.ll" { // wide character constant tao_yylval.wcval = ace_yytext[2]; @@ -2438,7 +2442,7 @@ YY_RULE_SETUP YY_BREAK case 103: YY_RULE_SETUP -#line 419 "fe/idl.ll" +#line 423 "fe/idl.ll" { // hexadecimal wide character constant tao_yylval.wcval = idl_wchar_escape_reader (ace_yytext + 2); @@ -2447,11 +2451,11 @@ YY_RULE_SETUP YY_BREAK case 104: /* rule 104 can match eol */ -#line 425 "fe/idl.ll" +#line 429 "fe/idl.ll" case 105: /* rule 105 can match eol */ YY_RULE_SETUP -#line 425 "fe/idl.ll" +#line 429 "fe/idl.ll" {/* remember pragma */ idl_global->set_lineno (idl_global->lineno () + 1); idl_store_pragma (ace_yytext); @@ -2460,11 +2464,11 @@ YY_RULE_SETUP YY_BREAK case 106: /* rule 106 can match eol */ -#line 431 "fe/idl.ll" +#line 435 "fe/idl.ll" case 107: /* rule 107 can match eol */ YY_RULE_SETUP -#line 431 "fe/idl.ll" +#line 435 "fe/idl.ll" {/* ignore file */ idl_global->set_lineno(idl_global->lineno () + 1); break; @@ -2472,11 +2476,11 @@ YY_RULE_SETUP YY_BREAK case 108: /* rule 108 can match eol */ -#line 436 "fe/idl.ll" +#line 440 "fe/idl.ll" case 109: /* rule 109 can match eol */ YY_RULE_SETUP -#line 436 "fe/idl.ll" +#line 440 "fe/idl.ll" { idl_parse_line_and_file (ace_yytext); break; @@ -2484,11 +2488,11 @@ YY_RULE_SETUP YY_BREAK case 110: /* rule 110 can match eol */ -#line 441 "fe/idl.ll" +#line 445 "fe/idl.ll" case 111: /* rule 111 can match eol */ YY_RULE_SETUP -#line 441 "fe/idl.ll" +#line 445 "fe/idl.ll" { idl_parse_line_and_file (ace_yytext); break; @@ -2496,11 +2500,11 @@ YY_RULE_SETUP YY_BREAK case 112: /* rule 112 can match eol */ -#line 446 "fe/idl.ll" +#line 450 "fe/idl.ll" case 113: /* rule 113 can match eol */ YY_RULE_SETUP -#line 446 "fe/idl.ll" +#line 450 "fe/idl.ll" { idl_parse_line_and_file (ace_yytext); break; @@ -2508,11 +2512,11 @@ YY_RULE_SETUP YY_BREAK case 114: /* rule 114 can match eol */ -#line 451 "fe/idl.ll" +#line 455 "fe/idl.ll" case 115: /* rule 115 can match eol */ YY_RULE_SETUP -#line 451 "fe/idl.ll" +#line 455 "fe/idl.ll" { idl_parse_line_and_file (ace_yytext); break; @@ -2520,11 +2524,11 @@ YY_RULE_SETUP YY_BREAK case 116: /* rule 116 can match eol */ -#line 456 "fe/idl.ll" +#line 460 "fe/idl.ll" case 117: /* rule 117 can match eol */ YY_RULE_SETUP -#line 456 "fe/idl.ll" +#line 460 "fe/idl.ll" { /* ignore cpp ident */ idl_global->set_lineno (idl_global->lineno () + 1); @@ -2534,7 +2538,7 @@ YY_RULE_SETUP case 118: /* rule 118 can match eol */ YY_RULE_SETUP -#line 461 "fe/idl.ll" +#line 465 "fe/idl.ll" { /* ignore comments */ idl_global->set_lineno(idl_global->lineno () + 1); @@ -2543,7 +2547,7 @@ YY_RULE_SETUP YY_BREAK case 119: YY_RULE_SETUP -#line 466 "fe/idl.ll" +#line 470 "fe/idl.ll" { for (;;) { @@ -2566,13 +2570,13 @@ YY_RULE_SETUP YY_BREAK case 120: YY_RULE_SETUP -#line 485 "fe/idl.ll" +#line 489 "fe/idl.ll" break; YY_BREAK case 121: /* rule 121 can match eol */ YY_RULE_SETUP -#line 486 "fe/idl.ll" +#line 490 "fe/idl.ll" { idl_global->set_lineno (idl_global->lineno () + 1); break; @@ -2580,15 +2584,15 @@ YY_RULE_SETUP YY_BREAK case 122: YY_RULE_SETUP -#line 490 "fe/idl.ll" +#line 494 "fe/idl.ll" return ace_yytext[0]; YY_BREAK case 123: YY_RULE_SETUP -#line 492 "fe/idl.ll" +#line 496 "fe/idl.ll" ECHO; YY_BREAK -#line 2593 "fe/idl.yy.cpp" +#line 2597 "fe/idl.yy.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3569,7 +3573,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 492 "fe/idl.ll" +#line 496 "fe/idl.ll" /* subroutines */ diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp index f4eee04b4de6f..6af872f59625f 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp @@ -182,15 +182,15 @@ TAO::SSLIOP::Acceptor::create_new_profile (const TAO::ObjectKey &object_key, // TAO extension, replace the contents of the octet sequence with // the CDR stream - const CORBA::ULong length = cdr.total_length (); + CORBA::ULong const length = static_cast (cdr.total_length ()); component.component_data.length (length); CORBA::Octet *buf = component.component_data.get_buffer (); - for (const ACE_Message_Block *i = cdr.begin (); - i != 0; - i = i->cont ()) + for (ACE_Message_Block const *mb = cdr.begin (); + mb != nullptr; + mb = mb->cont ()) { - ACE_OS::memcpy (buf, i->rd_ptr (), i->length ()); - buf += i->length (); + ACE_OS::memcpy (buf, mb->rd_ptr (), mb->length ()); + buf += mb->length (); } pfile->tagged_components ().set_component (component); @@ -285,7 +285,7 @@ TAO::SSLIOP::Acceptor::create_shared_profile (const TAO::ObjectKey &object_key, // TAO extension, replace the contents of the octet sequence with // the CDR stream - CORBA::ULong length = cdr.total_length (); + CORBA::ULong const length = static_cast (cdr.total_length ()); component.component_data.length (length); CORBA::Octet *buf = component.component_data.get_buffer (); for (const ACE_Message_Block *i = cdr.begin (); @@ -605,7 +605,7 @@ TAO::SSLIOP::Acceptor::parse_options_i (int &argc, ACE_CString ** argv) int ssl_port = ACE_OS::atoi (value.c_str ()); if (ssl_port >= 0 && ssl_port < 65536) - this->ssl_component_.port = ssl_port; + this->ssl_component_.port = static_cast (ssl_port); else ORBSVCS_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) Invalid ") diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp index 0528fe63f036c..7b36d535e80fe 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp @@ -36,7 +36,7 @@ TAO_SSLIOP_PASSWORD_CALLBACK_NAME (char *buf, if (password != 0) { - pwlen = ACE_OS::strlen (password); + pwlen = static_cast (ACE_OS::strlen (password)); int copy_len = pwlen + 1; // Include the NULL terminator @@ -219,11 +219,6 @@ TAO::SSLIOP::CredentialsAcquirer::make_X509 (const ::SSLIOP::File &certificate) // No password is used or needed when reading ASN.1 encoded // certificates. - const char *filename = certificate.filename.in (); - - if (filename == 0) - return 0; - fp = ACE_OS::fopen (filename, "rb"); if (fp == 0) @@ -295,11 +290,6 @@ TAO::SSLIOP::CredentialsAcquirer::make_EVP_PKEY (const ::SSLIOP::File &key) // No password is used or needed when reading ASN.1 encoded // private keys. - const char *filename = key.filename.in (); - - if (filename == 0) - return 0; - fp = ACE_OS::fopen (filename, "rb"); if (fp == 0) diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp index 0c612a988c08f..ed6b72e338434 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp @@ -133,15 +133,14 @@ TAO_SSLIOP_Endpoint::next (void) CORBA::Boolean TAO_SSLIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) { - TAO_Endpoint *endpt = const_cast (other_endpoint); + TAO_Endpoint *const endpt = const_cast (other_endpoint); - TAO_SSLIOP_Endpoint *endpoint = - dynamic_cast (endpt); + TAO_SSLIOP_Endpoint *const endpoint = dynamic_cast (endpt); - if (endpoint == 0) - return 0; + if (!endpoint) + return false; - ::Security::EstablishTrust t = endpoint->trust (); + ::Security::EstablishTrust const t = endpoint->trust (); if ((this->ssl_component_.port != 0 && endpoint->ssl_component_.port != 0 @@ -161,14 +160,14 @@ TAO_SSLIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) // numbers often may not make sense. Or may not being used anyway. // Therefore, we only need to directly compare the hosts. See also the // comments in the hash() method. - if (this->iiop_endpoint() == 0 || endpoint->iiop_endpoint() == 0) - return 0; + if (this->iiop_endpoint () == nullptr || endpoint->iiop_endpoint () == nullptr) + return false; - if ((ACE_OS::strcmp (this->iiop_endpoint()->host (), - endpoint->iiop_endpoint()->host ()) != 0)) - return 0; + if (ACE_OS::strcmp (this->iiop_endpoint ()->host (), + endpoint->iiop_endpoint ()->host ()) != 0) + return false; - return 1; + return true; } TAO_Endpoint * diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp index 907e72469833e..ada36a1002ce0 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Factory.cpp @@ -70,7 +70,7 @@ namespace for (len = 0; len < max; ) { #if defined (ACE_WIN32) - c = ::_getch (); + c = static_cast (::_getch ()); #else int ci = ::getchar (); if (ci == EOF) @@ -145,7 +145,7 @@ TAO::SSLIOP::Protocol_Factory::pem_passwd_cb (char *buf, int size, int , void *t ACE_OS::printf ("%s: ",prompt); pem_passwd_.resize (size); pem_passwd_.clear (); - len = secret_input (buf, size); + len = ACE_Utils::truncate_cast (secret_input (buf, size)); ACE_OS::printf ("\n"); pem_passwd_ = buf; return len; @@ -209,7 +209,7 @@ TAO::SSLIOP::Protocol_Factory::pem_passwd_cb (char *buf, int size, int , void *t } } - len = ACE_Utils::truncate_cast (pem_passwd_.length()); + len = ACE_Utils::truncate_cast (pem_passwd_.length ()); if (len >= size) { if (TAO_debug_level > 0) @@ -331,16 +331,16 @@ TAO::SSLIOP::Protocol_Factory::init (int argc, ACE_TCHAR* argv[]) // The code is cleaner this way anyway. ACE_SSL_Context * ssl_ctx = ACE_SSL_Context::instance (); - size_t session_id_len = + size_t const session_id_len = (sizeof session_id_context_ >= SSL_MAX_SSL_SESSION_ID_LENGTH) ? SSL_MAX_SSL_SESSION_ID_LENGTH : sizeof session_id_context_; // Note that this function returns 1, if the operation succeeded. // See SSL_CTX_set_session_id_context(3) - if( 1 != ::SSL_CTX_set_session_id_context (ssl_ctx->context(), + if (1 != ::SSL_CTX_set_session_id_context (ssl_ctx->context (), session_id_context_, - session_id_len)) + static_cast (session_id_len))) { if (TAO_debug_level > 0) ORBSVCS_ERROR ((LM_ERROR, diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp index dcca6d0180863..26dd030d39cce 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Profile.cpp @@ -90,15 +90,14 @@ TAO_SSLIOP_Profile::decode (TAO_InputCDR & cdr) if (this->tagged_components ().get_component (component)) { - TAO_InputCDR cdr (reinterpret_cast ( - component.component_data.get_buffer ()), - component.component_data.length ()); + TAO_InputCDR cdr_component (reinterpret_cast (component.component_data.get_buffer ()), + component.component_data.length ()); CORBA::Boolean byte_order; - if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) + if ((cdr_component >> ACE_InputCDR::to_boolean (byte_order)) == 0) return -1; - cdr.reset_byte_order (static_cast (byte_order)); + cdr_component.reset_byte_order (static_cast (byte_order)); - if (cdr >> this->ssl_endpoint_.ssl_component_) + if (cdr_component >> this->ssl_endpoint_.ssl_component_) ssl_component_found = 1; else return -1; @@ -224,9 +223,7 @@ TAO_SSLIOP_Profile::encode_endpoints (void) endpoints.length (this->count_ - 1); const TAO_SSLIOP_Endpoint *endpoint = this->ssl_endpoint_.next_; - for (size_t i = 0; - i < this->count_ - 1; - ++i) + for (CORBA::ULong i = 0; i < this->count_ - 1; ++i) { endpoints[i] = endpoint->ssl_component (); endpoint = endpoint->next_; @@ -239,7 +236,7 @@ TAO_SSLIOP_Profile::encode_endpoints (void) || (out_cdr << endpoints) == 0) return -1; - const CORBA::ULong length = out_cdr.total_length (); + CORBA::ULong const length = static_cast (out_cdr.total_length ()); IOP::TaggedComponent tagged_component; tagged_component.tag = TAO::TAG_SSL_ENDPOINTS; @@ -251,7 +248,7 @@ TAO_SSLIOP_Profile::encode_endpoints (void) iterator != 0; iterator = iterator->cont ()) { - CORBA::ULong i_length = iterator->length (); + CORBA::ULong const i_length = static_cast (iterator->length ()); ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length); buf += i_length; diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Util.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Util.cpp index ae00e1548a474..5ab26ae5445e2 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Util.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Util.cpp @@ -37,8 +37,6 @@ TAO::SSLIOP::Util::current (TAO_ORB_Core *orb_core) return 0; } - - return 0; } TAO_END_VERSIONED_NAMESPACE_DECL From ef25c8bf5e5a34c77d510f56f3c4085a8bec4a74 Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Mon, 9 Jun 2025 15:53:11 -0500 Subject: [PATCH 2/3] updates for this branch --- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp | 2 +- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp index 6af872f59625f..7cc91ac13ba35 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Acceptor.cpp @@ -186,7 +186,7 @@ TAO::SSLIOP::Acceptor::create_new_profile (const TAO::ObjectKey &object_key, component.component_data.length (length); CORBA::Octet *buf = component.component_data.get_buffer (); for (ACE_Message_Block const *mb = cdr.begin (); - mb != nullptr; + mb; mb = mb->cont ()) { ACE_OS::memcpy (buf, mb->rd_ptr (), mb->length ()); diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp index ed6b72e338434..22b972bb46859 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Endpoint.cpp @@ -160,7 +160,7 @@ TAO_SSLIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) // numbers often may not make sense. Or may not being used anyway. // Therefore, we only need to directly compare the hosts. See also the // comments in the hash() method. - if (this->iiop_endpoint () == nullptr || endpoint->iiop_endpoint () == nullptr) + if (!this->iiop_endpoint () || !endpoint->iiop_endpoint ()) return false; if (ACE_OS::strcmp (this->iiop_endpoint ()->host (), From 37454b53f6182568fc7b4973990b52588b7a96e5 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 10 Jun 2025 09:26:19 +0200 Subject: [PATCH 3/3] Removed redundant include * ACE/ace/Message_Queue_T.cpp: --- ACE/ace/Message_Queue_T.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ACE/ace/Message_Queue_T.cpp b/ACE/ace/Message_Queue_T.cpp index 4b611ac8c0940..fd4e9fa3438a6 100644 --- a/ACE/ace/Message_Queue_T.cpp +++ b/ACE/ace/Message_Queue_T.cpp @@ -17,7 +17,6 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/Notification_Strategy.h" -#include "ace/Truncate.h" #include "ace/Condition_Attributes.h" #if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)