Skip to content

Commit 82ae83a

Browse files
committed
[mlir] Silence a few -Wunused-but-set-parameter warnings
Some older versions of gcc hit false positives here: /workdir/llvm-project/mlir/include/mlir/IR/Attributes.h:391:49: warning: parameter 'ty' set but not used [-Wunused-but-set-parameter] 391 | static inline bool isPossible(mlir::Attribute ty) { https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81676
1 parent 22f0c7a commit 82ae83a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

mlir/include/mlir/IR/Attributes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ struct CastInfo<To, From,
392392
/// Return a constant true instead of a dynamic true when casting to self or
393393
/// up the hierarchy.
394394
if constexpr (std::is_base_of_v<To, From>) {
395+
(void)ty;
395396
return true;
396397
} else {
397398
return To::classof(ty);

mlir/include/mlir/IR/Types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ struct CastInfo<
387387
/// Return a constant true instead of a dynamic true when casting to self or
388388
/// up the hierarchy.
389389
if constexpr (std::is_base_of_v<To, From>) {
390+
(void)ty;
390391
return true;
391392
} else {
392393
return To::classof(ty);

mlir/include/mlir/IR/Value.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ struct CastInfo<
576576
/// Return a constant true instead of a dynamic true when casting to self or
577577
/// up the hierarchy.
578578
if constexpr (std::is_base_of_v<To, From>) {
579+
(void)ty;
579580
return true;
580581
} else {
581582
return To::classof(ty);

0 commit comments

Comments
 (0)