[llvm] 2700d66 - [llvm-c-test] Fix unused variable warnings
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 21:00:52 PST 2023
Author: Kazu Hirata
Date: 2023-02-08T21:00:45-08:00
New Revision: 2700d66a054327c2dbb90d8b44b1d5cf3b0043b8
URL: https://github.com/llvm/llvm-project/commit/2700d66a054327c2dbb90d8b44b1d5cf3b0043b8
DIFF: https://github.com/llvm/llvm-project/commit/2700d66a054327c2dbb90d8b44b1d5cf3b0043b8.diff
LOG: [llvm-c-test] Fix unused variable warnings
This patch fixes:
llvm/tools/llvm-c-test/debuginfo.c:211:12: error: unused variable
'tag0' [-Werror,-Wunused-variable]
llvm/tools/llvm-c-test/debuginfo.c:222:12: error: unused variable
'tag1' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/tools/llvm-c-test/debuginfo.c
Removed:
################################################################################
diff --git a/llvm/tools/llvm-c-test/debuginfo.c b/llvm/tools/llvm-c-test/debuginfo.c
index 26a063f8fe69..9b8a2bd6326c 100644
--- a/llvm/tools/llvm-c-test/debuginfo.c
+++ b/llvm/tools/llvm-c-test/debuginfo.c
@@ -211,6 +211,7 @@ int llvm_get_di_tag(void) {
uint16_t tag0 = LLVMGetDINodeTag(md);
assert(tag0 == 0);
+ (void)tag0;
const char *filename = "metadata.c";
LLVMDIBuilderRef builder = LLVMCreateDIBuilder(m);
@@ -222,6 +223,7 @@ int llvm_get_di_tag(void) {
uint16_t tag1 = LLVMGetDINodeTag(decl);
assert(tag1 == 0x13);
+ (void)tag1;
LLVMDisposeModule(m);
More information about the llvm-commits
mailing list