[Mlir-commits] [mlir] afc94c0 - [mlir] Fix a compiler warning

Kazu Hirata llvmlistbot at llvm.org
Wed Jan 5 09:42:12 PST 2022


Author: Kazu Hirata
Date: 2022-01-05T09:42:03-08:00
New Revision: afc94c0ed7f3e5c90eca786d693d9a8b6f9876cd

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

LOG: [mlir] Fix a compiler warning

This patch fixes:

  mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp:635:23:
  error: comparison of integers of different signs: 'int' and 'size_t'
  (aka 'unsigned long') [-Werror,-Wsign-compare]

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
index c84545dc21df..00719b3e3466 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
@@ -632,7 +632,7 @@ struct CallOpInterface
         callOp.getLoc(), funcOp.sym_name(), resultTypes, newOperands);
     newCallOp->setAttrs(callOp->getAttrs());
     // Get replacement values for non-tensor / non-equivalent results.
-    for (int i = 0; i < replacementValues.size(); ++i) {
+    for (unsigned i = 0; i < replacementValues.size(); ++i) {
       if (replacementValues[i])
         continue;
       replacementValues[i] = newCallOp->getResult(*retValMapping[i]);


        


More information about the Mlir-commits mailing list