Skip to content

Commit 4ca9ccd

Browse files
kazutakahirataIanWood1
authored andcommitted
[mlir] Fix a warning
This patch fixes: mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp:2905:17: error: unused variable 'var' [-Werror,-Wunused-variable] mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp:2908:42: error: unused variable 'dataClauseOptional' [-Werror,-Wunused-variable]
1 parent 621db59 commit 4ca9ccd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2905,11 +2905,13 @@ checkDeclareOperands(Op &op, const mlir::ValueRange &operands,
29052905
mlir::Value var{getVar(operand.getDefiningOp())};
29062906
assert(var && "declare operands can only be data entry operations which "
29072907
"must have var");
2908+
(void)var;
29082909
std::optional<mlir::acc::DataClause> dataClauseOptional{
29092910
getDataClause(operand.getDefiningOp())};
29102911
assert(dataClauseOptional.has_value() &&
29112912
"declare operands can only be data entry operations which must have "
29122913
"dataClause");
2914+
(void)dataClauseOptional;
29132915
}
29142916

29152917
return success();

0 commit comments

Comments
 (0)