Skip to content

Commit 915827f

Browse files
Jim Meyeringfacebook-github-bot
authored andcommitted
executorch/examples/portable/custom_ops/custom_ops_2_out.cpp: fix llvm-17-exposed format mismatches
Summary: This avoids the following errors: executorch/examples/portable/custom_ops/custom_ops_2_out.cpp:23:7: error: format specifies type 'char' but the argument has type 'ScalarType' [-Werror,-Wformat] executorch/examples/portable/custom_ops/custom_ops_2_out.cpp:27:7: error: format specifies type 'char' but the argument has type 'ScalarType' [-Werror,-Wformat] Differential Revision: D64656845
1 parent af13be9 commit 915827f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/portable/custom_ops/custom_ops_2_out.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ void check_preconditions(const Tensor& in, Tensor& out) {
2020
ET_CHECK_MSG(
2121
out.scalar_type() == ScalarType::Float,
2222
"Expected out tensor to have dtype Float, but got %hhd instead",
23-
out.scalar_type());
23+
static_cast<int8_t>(out.scalar_type()));
2424
ET_CHECK_MSG(
2525
in.scalar_type() == ScalarType::Float,
2626
"Expected in tensor to have dtype Float, but got %hhd instead",
27-
in.scalar_type());
27+
static_cast<int8_t>(in.scalar_type()));
2828
ET_CHECK_MSG(
2929
out.dim() == in.dim(),
3030
"Number of dims of out tensor is not compatible with inputs");

0 commit comments

Comments
 (0)