[Mlir-commits] [mlir] eba3fec - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Tue Nov 15 12:01:07 PST 2022
Author: Kazu Hirata
Date: 2022-11-15T12:01:00-08:00
New Revision: eba3fece88f51ca4e7e0a9508f3b012e6bb7e2d0
URL: https://github.com/llvm/llvm-project/commit/eba3fece88f51ca4e7e0a9508f3b012e6bb7e2d0
DIFF: https://github.com/llvm/llvm-project/commit/eba3fece88f51ca4e7e0a9508f3b012e6bb7e2d0.diff
LOG: [mlir] Fix warnings
This patch fixes:
mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h:955:20:
error: unused variable 'sz' [-Werror,-Wunused-variable]
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:1460:2:
error: extra ';' outside of a function is incompatible with C++98
[-Werror,-Wc++98-compat-extra-semi]
Added:
Modified:
mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
index b61b62daed667..ee9ad04239e5e 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
@@ -952,8 +952,7 @@ SparseTensorStorage<P, I, V> *SparseTensorStorage<P, I, V>::newFromCOO(
std::vector<uint64_t> dimSizes(dimRank);
for (uint64_t l = 0; l < lvlRank; ++l) {
const uint64_t d = lvl2dim[l];
- const uint64_t sz = dimShape[d];
- assert((sz == 0 || sz == lvlSizes[l]) &&
+ assert((dimShape[d] == 0 || dimShape[d] == lvlSizes[l]) &&
"Dimension sizes do not match expected shape");
dimSizes[d] = lvlSizes[l];
}
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index ff8549253cff5..887da66ea8ac8 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -1457,7 +1457,7 @@ static DiagnosedSilenceableFailure unpackPDLOperations(
}
return DiagnosedSilenceableFailure(success());
-};
+}
DiagnosedSilenceableFailure transform::tileToForeachThreadOpImpl(
RewriterBase &rewriter, transform::TransformState &state,
More information about the Mlir-commits
mailing list