[libc-commits] [libc] b3f9334 - [libc] Remove warning about unused variable

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Mon Jan 30 02:01:48 PST 2023


Author: Guillaume Chatelet
Date: 2023-01-30T10:01:30Z
New Revision: b3f9334437054b5b1c6585b10ffaa5f778348719

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

LOG: [libc] Remove warning about unused variable

Differential Revision: https://reviews.llvm.org/D142376

Added: 
    

Modified: 
    libc/src/assert/__assert_fail.cpp

Removed: 
    


################################################################################
diff  --git a/libc/src/assert/__assert_fail.cpp b/libc/src/assert/__assert_fail.cpp
index 7ee319e8beb19..752a28a1c9931 100644
--- a/libc/src/assert/__assert_fail.cpp
+++ b/libc/src/assert/__assert_fail.cpp
@@ -15,6 +15,7 @@ namespace __llvm_libc {
 LLVM_LIBC_FUNCTION(void, __assert_fail,
                    (const char *assertion, const char *file, unsigned line,
                     const char *function)) {
+  (void)line; // Suppress warning as long as line is unused.
   write_to_stderr(file);
   write_to_stderr(": Assertion failed: '");
   write_to_stderr(assertion);


        


More information about the libc-commits mailing list