Skip to content

Commit 4a0ab14

Browse files
authored
Merge pull request #2396 from mitza-oci/a6t2-warnings
[ACE 6 - TAO 2] Fixed warnings
2 parents 5b2c308 + 37454b5 commit 4a0ab14

10 files changed

Lines changed: 179 additions & 188 deletions

File tree

ACE/ace/Message_Queue_T.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#endif /* ACE_LACKS_PRAGMA_ONCE */
1818

1919
#include "ace/Notification_Strategy.h"
20-
#include "ace/Truncate.h"
2120
#include "ace/Condition_Attributes.h"
2221

2322
#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1)
@@ -1324,7 +1323,7 @@ ACE_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::enqueue_head_i (ACE_Message_Block
13241323
if (this->signal_dequeue_waiters () == -1)
13251324
return -1;
13261325
else
1327-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
1326+
return static_cast<int> (this->cur_count_);
13281327
}
13291328

13301329
// Actually put the node at its proper position relative to its
@@ -1515,7 +1514,7 @@ ACE_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::dequeue_head_i (ACE_Message_Block
15151514
&& this->signal_enqueue_waiters () == -1)
15161515
return -1;
15171516
else
1518-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
1517+
return static_cast<int> (this->cur_count_);
15191518
}
15201519

15211520
// Get the earliest (i.e., FIFO) ACE_Message_Block with the lowest
@@ -1591,7 +1590,7 @@ ACE_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::dequeue_prio_i (ACE_Message_Block
15911590
&& this->signal_enqueue_waiters () == -1)
15921591
return -1;
15931592
else
1594-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
1593+
return static_cast<int> (this->cur_count_);
15951594
}
15961595

15971596
// Actually get the last ACE_Message_Block (no locking, so must be
@@ -1640,7 +1639,7 @@ ACE_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::dequeue_tail_i (ACE_Message_Block
16401639
&& this->signal_enqueue_waiters () == -1)
16411640
return -1;
16421641
else
1643-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
1642+
return static_cast<int> (this->cur_count_);
16441643
}
16451644

16461645
// Actually get the ACE_Message_Block with the lowest deadline time
@@ -1735,7 +1734,7 @@ ACE_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::peek_dequeue_head (ACE_Message_Bl
17351734
return -1;
17361735

17371736
first_item = this->head_;
1738-
return ACE_Utils::truncate_cast<int> (static_cast<ssize_t> (this->cur_count_));
1737+
return static_cast<int> (this->cur_count_);
17391738
}
17401739

17411740
template <ACE_SYNCH_DECL, class TIME_POLICY> int
@@ -2436,7 +2435,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::enqueue_i (ACE_Message_Bl
24362435
}
24372436
else
24382437
{
2439-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
2438+
return static_cast<int> (this->cur_count_);
24402439
}
24412440
}
24422441

@@ -2636,7 +2635,7 @@ ACE_Dynamic_Message_Queue<ACE_SYNCH_USE, TIME_POLICY>::dequeue_head_i (ACE_Messa
26362635
}
26372636
else
26382637
{
2639-
return ACE_Utils::truncate_cast<int> (this->cur_count_);
2638+
return static_cast<int> (this->cur_count_);
26402639
}
26412640
}
26422641

TAO/TAO_IDL/be/be_codegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3772,7 +3772,7 @@ TAO_CodeGen::make_rand_extension (char * const t)
37723772

37733773
// Factor out the constant coefficient.
37743774
float const coefficient =
3775-
static_cast<float> (MAX_VAL / (static_cast<float> (RAND_MAX) + 1.0f));
3775+
static_cast<float> (MAX_VAL / static_cast<float> (RAND_MAX) + 1.0f);
37763776

37773777
for (unsigned int n = 0; n < NUM_CHARS; ++n)
37783778
{

TAO/TAO_IDL/fe/idl.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ static AST_Decl * idl_find_node (const char *);
112112
#undef ECHO
113113
#endif
114114

115+
#ifdef __GNUC__
116+
# pragma GCC diagnostic ignored "-Wmisleading-indentation"
117+
#endif
118+
115119
%}
116120

117121
/* SO we don't choke on files that use \r\n */

0 commit comments

Comments
 (0)