Fixed warnings#2395
Conversation
WalkthroughThis update refines internal type casting and code clarity across multiple components, including message queue casting, random coefficient calculation, pragma additions to suppress compiler warnings, and explicit type casts in SSLIOP modules. It also removes redundant code and improves const-correctness without changing public interfaces or control flow. Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
TAO/TAO_IDL/fe/idl.ll (1)
117-119: Suppress misleading indentation warnings for GCCThe added
#pragma GCC diagnostic ignored "-Wmisleading-indentation"inside the__GNUC__guard correctly silences the unwanted indentation warnings in this lexer block.Optional: Scope the suppression to this block only by bracketing it with
push/pop:#ifdef __GNUC__ -# pragma GCC diagnostic ignored "-Wmisleading-indentation" +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmisleading-indentation" #endif %} +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endifTAO/TAO_IDL/fe/idl.yy.cpp (1)
1464-1467: Suppress GCC misleading-indentation warnings
Adding a conditional#pragma GCC diagnostic ignored "-Wmisleading-indentation"correctly silences spurious warnings in generated lexer code. To localize the suppression and avoid impacting other code, consider bracketing this with#pragma GCC diagnostic pushbefore and#pragma GCC diagnostic popafter the generated region.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
ACE/ace/Message_Queue_T.cpp(7 hunks)TAO/TAO_IDL/be/be_codegen.cpp(1 hunks)TAO/TAO_IDL/fe/idl.ll(1 hunks)TAO/TAO_IDL/fe/idl.yy.cpp(17 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: macos-13-C++
🔇 Additional comments (7)
ACE/ace/Message_Queue_T.cpp (6)
1332-1332: Simplify cast in enqueue_head_i
Directstatic_cast<int>replaces the previousACE_Utils::truncate_cast<int>, improving readability and performance.cur_count_remains withinintrange in normal use.
1523-1523: Use static_cast for dequeue_head_i return
Swapping outtruncate_castforstatic_cast<int>here is consistent and safe, given the bounded nature ofcur_count_.
1599-1599: Replace truncate_cast with static_cast in dequeue_prio_i
The directstatic_cast<int>is clearer and incurs no extra overhead; overflow is not a concern forcur_count_.
1648-1648: Simplify cast in dequeue_tail_i
Switching tostatic_cast<int>maintains behavior while removing the dependency onACE_Utils::truncate_cast.
1726-1726: Use static_cast in peek_dequeue_head
Applyingstatic_cast<int>is appropriate for convertingcur_count_here and aligns with other methods.
2443-2443: Consistent static_cast in ACE_Dynamic_Message_Queue::enqueue_i
The change tostatic_cast<int>matches the pattern used elsewhere and is efficient for this internal conversion.TAO/TAO_IDL/fe/idl.yy.cpp (1)
1468-1470: Update#linedirectives for correct debug mapping
The new#line 1471and#line 1473directives shift the source‐level mappings by four lines. Please verify that all corresponding#linemarkers throughout the generated sections have been adjusted consistently to ensure accurate debugging and error reporting.
Fixed warnings
Summary by CodeRabbit