[Mlir-commits] [mlir] [mlir][CAPI] Fix unused-but-set-variable warning in smt.c (PR #188473)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 25 05:11:49 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Longsheng Mou (CoTinker)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/188473.diff
1 Files Affected:
- (modified) mlir/test/CAPI/smt.c (+1)
``````````diff
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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/188473
More information about the Mlir-commits
mailing list