[Mlir-commits] [mlir] [mlir][CAPI] Fix unused-but-set-variable warning in smt.c (PR #188473)
Longsheng Mou
llvmlistbot at llvm.org
Wed Mar 25 05:11:17 PDT 2026
https://github.com/CoTinker created https://github.com/llvm/llvm-project/pull/188473
llvm-project/mlir/test/CAPI/smt.c:37:21: warning: variable 'result' set but not used [-Wunused-but-set-variable]
37 | MlirLogicalResult result = mlirTranslateModuleToSMTLIB(
| ^
1 warning generated.
>From 2bbe784fe50058f615f7f12792c6bcbabe206e25 Mon Sep 17 00:00:00 2001
From: Longsheng Mou <longshengmou at gmail.com>
Date: Wed, 25 Mar 2026 20:07:59 +0800
Subject: [PATCH] [mlir][CAPI] Fix unused-but-set-variable warning in smt.c
llvm-project/mlir/test/CAPI/smt.c:37:21: warning: variable 'result' set but not used [-Wunused-but-set-variable]
37 | MlirLogicalResult result = mlirTranslateModuleToSMTLIB(
| ^
1 warning generated.
---
mlir/test/CAPI/smt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mlir/test/CAPI/smt.c b/mlir/test/CAPI/smt.c
index a621147c91b61..7e206fc3fbb6a 100644
--- a/mlir/test/CAPI/smt.c
+++ b/mlir/test/CAPI/smt.c
@@ -44,6 +44,7 @@ void testExportSMTLIB(MlirContext ctx) {
result = mlirTranslateModuleToSMTLIB(module, dumpCallback, NULL, false, false,
false);
assert(mlirLogicalResultIsSuccess(result));
+ (void)result;
// CHECK-NOT: (reset)
mlirModuleDestroy(module);
More information about the Mlir-commits
mailing list