Skip to content

Fix Coverity Issues and Compiler Warnings#1594

Merged
mitza-oci merged 6 commits into
DOCGroup:masterfrom
iguessthislldo:igtd/stdint
Jul 9, 2021
Merged

Fix Coverity Issues and Compiler Warnings#1594
mitza-oci merged 6 commits into
DOCGroup:masterfrom
iguessthislldo:igtd/stdint

Conversation

@iguessthislldo

@iguessthislldo iguessthislldo commented Jul 8, 2021

Copy link
Copy Markdown
Member

Follow up to #840

DOCGroup#840

Because the main set of issues in `coerce_value` was caused by applying
the existing pattern, the issues caused by the existing code should also
be fixed.
@iguessthislldo iguessthislldo added this to the 7.0.3/3.0.3 milestone Jul 8, 2021
@iguessthislldo iguessthislldo requested a review from mitza-oci July 9, 2021 00:17
iguessthislldo added a commit to iguessthislldo/ACE_TAO that referenced this pull request Jul 9, 2021
Ported from DOCGroup#840 to ACE6/TAO2.
Also regenerated with Bison 3.7.6 at the same time like in
d581918 in
DOCGroup#1594
@iguessthislldo iguessthislldo changed the title Fix Coverity Issues and Compiler Warnings Issues from #840 Fix Coverity Issues and Compiler Warnings Jul 9, 2021
@mitza-oci mitza-oci merged commit 5e3afb9 into DOCGroup:master Jul 9, 2021
@jwillemsen

jwillemsen commented Jul 11, 2021

Copy link
Copy Markdown
Member

One warning left, see https://buildlogs.remedy.nl/win_vs2019_opendds_debug/2021_07_11_02_18_Full.html#warning_1

447>X:\BUILD\DOC_ROOT\TAO\TAO_IDL\ast\ast_expression.cpp(1140,44): warning C4244: '=': conversion from 'double' to 'ACE_7_0_2::ACE_CDR::Float', possible loss of data [X:\BUILD\DOC_ROOT\TAO\TAO_IDL\TAO_IDL_FE.vcxproj]

@iguessthislldo

Copy link
Copy Markdown
Member Author

That looks like it would have been there before, but okay.

@iguessthislldo

Copy link
Copy Markdown
Member Author

#1602

@mitza-oci

Copy link
Copy Markdown
Member

That looks like it would have been there before, but okay.

I think it's due to precedence. The prior code had one more set of parens (float) ((ev->u.bval == true) ? 1.0 : 0.0), the current code applies the cast to first operand of the ?:. One more reason why C++ casts are better than C casts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants