Skip to content

Commit

Permalink
[libc][nfc] Silence two warnings in tests
Browse files Browse the repository at this point in the history
These currently give warnings for unused variables or a default case
where everything is covered.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D153137
  • Loading branch information
jhuber6 committed Jun 16, 2023
1 parent 193c7d1 commit 485e2de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions libc/test/UnitTest/RoundingModeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,14 @@ int get_fe_rounding(RoundingMode mode) {
switch (mode) {
case RoundingMode::Upward:
return FE_UPWARD;
break;
case RoundingMode::Downward:
return FE_DOWNWARD;
break;
case RoundingMode::TowardZero:
return FE_TOWARDZERO;
break;
case RoundingMode::Nearest:
return FE_TONEAREST;
break;
default:
__builtin_unreachable();
}
__builtin_unreachable();
}

ForceRoundingMode::ForceRoundingMode(RoundingMode mode) {
Expand Down
1 change: 0 additions & 1 deletion libc/test/src/__support/uint_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ using LL_Int128 = __llvm_libc::cpp::Int<128>;
using LL_Int192 = __llvm_libc::cpp::Int<192>;

TEST(LlvmLibcUIntClassTest, BasicInit) {
LL_UInt128 empty;
LL_UInt128 half_val(12345);
LL_UInt128 full_val({12345, 67890});
ASSERT_TRUE(half_val != full_val);
Expand Down

0 comments on commit 485e2de

Please sign in to comment.