[libc] Remove warning about unused variable
authorGuillaume Chatelet <gchatelet@google.com>
Mon, 23 Jan 2023 17:01:00 +0000 (17:01 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Mon, 30 Jan 2023 10:01:30 +0000 (10:01 +0000)
Differential Revision: https://reviews.llvm.org/D142376

libc/src/assert/__assert_fail.cpp

index 7ee319e..752a28a 100644 (file)
@@ -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);