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

[NFC] conversions: reenable Wunused-but-set-variable #1845

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test_conformance/conversions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set_source_files_properties(
COMPILE_FLAGS -march=i686)
endif(NOT CMAKE_CL_64 AND NOT MSVC AND NOT ANDROID)

set_gnulike_module_compile_flags("-Wno-unused-but-set-variable -Wno-sign-compare")
set_gnulike_module_compile_flags("-Wno-sign-compare")

include(../CMakeCommon.txt)
3 changes: 0 additions & 3 deletions test_conformance/conversions/fplib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,13 @@ float qcom_u64_2_f32(uint64_t data, bool sat, roundingMode rnd)
return as_float(result);
}
case qcomRTN: {
int inExact = 0;
if (!data)
return 0.0f;
uint32_t exponent = (127 + 64 - clz(data) - 1) << (FLT_MANT_DIG - 1); //add 1 for the implied 1.0 in normalized fp32 numbers
int mantShift = 40 - clz(data);
uint32_t mantissa;
if (mantShift >= 0){
uint64_t temp = (uint64_t)data >> mantShift;
if (temp << mantShift != data)
inExact = 1;
mantissa = (uint32_t)temp;
}
else
Expand Down
Loading