[Mlir-commits] [mlir] 12ba76c - Eliminate gcc7 compiler warnings

Jacques Pienaar llvmlistbot at llvm.org
Mon Mar 28 19:55:44 PDT 2022


Author: long.chen
Date: 2022-03-28T19:55:37-07:00
New Revision: 12ba76c6d161e3217bc7bce58ab2f4a0e58e1395

URL: https://github.com/llvm/llvm-project/commit/12ba76c6d161e3217bc7bce58ab2f4a0e58e1395
DIFF: https://github.com/llvm/llvm-project/commit/12ba76c6d161e3217bc7bce58ab2f4a0e58e1395.diff

LOG: Eliminate gcc7 compiler warnings

we will get warning:```parameter ‘op’ set but not used``` when template function with empty template parameter list.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D122527

Added: 
    

Modified: 
    mlir/include/mlir/IR/OpDefinition.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OpDefinition.h b/mlir/include/mlir/IR/OpDefinition.h
index c814b2bcbc7f6..cc9431553ddf2 100644
--- a/mlir/include/mlir/IR/OpDefinition.h
+++ b/mlir/include/mlir/IR/OpDefinition.h
@@ -1617,6 +1617,7 @@ static LogicalResult verifyTraits(Operation *op) {
 template <typename... Ts>
 static LogicalResult verifyRegionTraitsImpl(Operation *op,
                                             std::tuple<Ts...> *) {
+  (void)op;
   LogicalResult result = success();
   (void)std::initializer_list<int>{
       (result = succeeded(result) ? Ts::verifyRegionTrait(op) : failure(),


        


More information about the Mlir-commits mailing list