[libc-commits] [PATCH] D153137: [libc][nfc] Silence two warnings in tests

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 16 10:52:13 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG485e2de6d5a7: [libc][nfc] Silence two warnings in tests (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153137/new/

https://reviews.llvm.org/D153137

Files:
  libc/test/UnitTest/RoundingModeUtils.cpp
  libc/test/src/__support/uint_test.cpp


Index: libc/test/src/__support/uint_test.cpp
===================================================================
--- libc/test/src/__support/uint_test.cpp
+++ libc/test/src/__support/uint_test.cpp
@@ -25,7 +25,6 @@
 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);
Index: libc/test/UnitTest/RoundingModeUtils.cpp
===================================================================
--- libc/test/UnitTest/RoundingModeUtils.cpp
+++ libc/test/UnitTest/RoundingModeUtils.cpp
@@ -20,19 +20,14 @@
   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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153137.532229.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230616/c3278e5e/attachment-0001.bin>


More information about the libc-commits mailing list