Skip to content

enabled and fixed -Wfloat-conversion Clang warnings#7156

Merged
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:float-convert
Jan 2, 2025
Merged

enabled and fixed -Wfloat-conversion Clang warnings#7156
firewave merged 1 commit into
cppcheck-opensource:mainfrom
firewave:float-convert

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Jan 1, 2025

No description provided.

Comment thread lib/programmemory.cpp
ValueFlow::Value v;
combineValueProperties(args[0], args[1], v);
v.floatValue = std::scalbln(asFloat(args[0]), asFloat(args[1]));
v.floatValue = std::scalbln(asFloat(args[0]), asInt(args[1]));
Copy link
Copy Markdown
Collaborator Author

@firewave firewave Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need test coverage for this and the other mathematical functions (I have not yet checked if we have).

@firewave
Copy link
Copy Markdown
Collaborator Author

firewave commented Jan 1, 2025

After the int128-related cleanups we are left with few of these and as made evident by the changes it makes sense to have proper types and explicit conversions.

@firewave firewave merged commit 7db4566 into cppcheck-opensource:main Jan 2, 2025
@firewave firewave deleted the float-convert branch January 2, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants