Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Coverity Issues and Compiler Warnings #1594

Merged
merged 6 commits into from
Jul 9, 2021

Conversation

iguessthislldo
Copy link
Member

@iguessthislldo iguessthislldo commented Jul 8, 2021

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
Copy link
Member

jwillemsen commented Jul 11, 2021

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
Member Author

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

@iguessthislldo
Copy link
Member Author

#1602

@mitza-oci
Copy link
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