[libc-commits] [libc] 033dbbe - [libc][NFC] Clean up stray '; ' and default enum warning

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Sun Mar 10 07:32:19 PDT 2024


Author: Joseph Huber
Date: 2024-03-10T09:32:12-05:00
New Revision: 033dbbe4f183cc0c401af72a2d57ab659e9693d4

URL: https://github.com/llvm/llvm-project/commit/033dbbe4f183cc0c401af72a2d57ab659e9693d4
DIFF: https://github.com/llvm/llvm-project/commit/033dbbe4f183cc0c401af72a2d57ab659e9693d4.diff

LOG: [libc][NFC] Clean up stray ';' and default enum warning

Summary:
Cleans up two warnings I get locally while building.

Added: 
    

Modified: 
    libc/test/src/__support/FPUtil/fpbits_test.cpp
    libc/utils/gpu/loader/Loader.h

Removed: 
    


################################################################################
diff  --git a/libc/test/src/__support/FPUtil/fpbits_test.cpp b/libc/test/src/__support/FPUtil/fpbits_test.cpp
index 760031569c81f1..f5c27d4fc0302b 100644
--- a/libc/test/src/__support/FPUtil/fpbits_test.cpp
+++ b/libc/test/src/__support/FPUtil/fpbits_test.cpp
@@ -237,8 +237,6 @@ template <typename T> constexpr auto make(Sign sign, FP fp) {
     return T::signaling_nan(sign);
   case FP::QUIET_NAN:
     return T::quiet_nan(sign);
-  default:
-    __builtin_unreachable();
   }
 }
 

diff  --git a/libc/utils/gpu/loader/Loader.h b/libc/utils/gpu/loader/Loader.h
index e2aabb08c11dac..cffbaa673afd37 100644
--- a/libc/utils/gpu/loader/Loader.h
+++ b/libc/utils/gpu/loader/Loader.h
@@ -85,7 +85,7 @@ void *copy_argument_vector(int argc, char **argv, Allocator alloc) {
   // Ensure the vector is null terminated.
   reinterpret_cast<void **>(dev_argv)[argv_size] = nullptr;
   return dev_argv;
-};
+}
 
 /// Copy the system's environment to GPU memory allocated using \p alloc.
 template <typename Allocator>
@@ -95,7 +95,7 @@ void *copy_environment(char **envp, Allocator alloc) {
     ++envc;
 
   return copy_argument_vector(envc, envp, alloc);
-};
+}
 
 inline void handle_error(const char *msg) {
   fprintf(stderr, "%s\n", msg);


        


More information about the libc-commits mailing list