From d5a50b02e614d97c054c5c1e67922abc911fa5b6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 10 Apr 2023 10:11:41 -0700 Subject: [PATCH] Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes: mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:1334:51: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] lld/wasm/Writer.cpp:250:39: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] --- lld/wasm/Writer.cpp | 2 +- mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index d9e8727..2ec8848b 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -247,7 +247,7 @@ computeHash(llvm::MutableArrayRef hashBuf, static void makeUUID(unsigned version, llvm::ArrayRef fileHash, llvm::MutableArrayRef output) { - assert(version == 4 || version == 5 && "Unknown UUID version"); + assert((version == 4 || version == 5) && "Unknown UUID version"); assert(output.size() == 16 && "Wrong size for UUID output"); if (version == 5) { // Build a valid v5 UUID from a hardcoded (randomly-generated) namespace diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp index e548615..d74a603 100644 --- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp +++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp @@ -1330,9 +1330,9 @@ packMatmulGreedily(RewriterBase &rewriter, LinalgOp linalgOp, ArrayRef mnkPaddedSizesNextMultipleOf, ArrayRef mnkOrder) { assert(mnkPackedSizes.size() == 3 && "unexpected num of packing sizes"); - assert(mnkPaddedSizesNextMultipleOf.empty() || - mnkPaddedSizesNextMultipleOf.size() == 3 && - "num of packing sizes next multiple should be empty or of size 3"); + assert((mnkPaddedSizesNextMultipleOf.empty() || + mnkPaddedSizesNextMultipleOf.size() == 3) && + "num of packing sizes next multiple should be empty or of size 3"); assert(mnkOrder.size() == 3 && "unexpected mnkOrder size"); assert(isPermutationVector(mnkOrder) && "expected a permutation"); -- 2.7.4