[libc-commits] [PATCH] D142376: [libc] Remove warning about unused variable

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jan 23 09:01:25 PST 2023


gchatelet created this revision.
gchatelet added a reviewer: michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
gchatelet requested review of this revision.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142376

Files:
  libc/src/assert/__assert_fail.cpp


Index: libc/src/assert/__assert_fail.cpp
===================================================================
--- libc/src/assert/__assert_fail.cpp
+++ libc/src/assert/__assert_fail.cpp
@@ -15,6 +15,7 @@
 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142376.491408.patch
Type: text/x-patch
Size: 531 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230123/4b30761d/attachment.bin>


More information about the libc-commits mailing list