Skip to content

Commit ab628cc

Browse files
Jim Meyeringfacebook-github-bot
authored andcommitted
executorch/examples/devtools/example_runner/example_runner.cpp: fix format mismatches printing error_code_t values (#6324)
Summary: Pull Request resolved: #6324 This avoids the following errors: executorch/examples/devtools/example_runner/example_runner.cpp:224:7: error: format specifies type 'unsigned int' but the argument has type 'Error' [-Werror,-Wformat] executorch/examples/devtools/example_runner/example_runner.cpp:245:7: error: format specifies type 'unsigned int' but the argument has type 'Error' [-Werror,-Wformat] executorch/examples/devtools/example_runner/example_runner.cpp:255:7: error: format specifies type 'unsigned int' but the argument has type 'Error' [-Werror,-Wformat] executorch/examples/devtools/example_runner/example_runner.cpp:297:9: error: format specifies type 'unsigned int' but the argument has type 'Error' [-Werror,-Wformat] Reviewed By: tarun292 Differential Revision: D64540817 fbshipit-source-id: 3f6154c801376bc10a1b7ff0f3e8994b47c8096a
1 parent 6b858f2 commit ab628cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/devtools/example_runner/example_runner.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int main(int argc, char** argv) {
221221
method.ok(),
222222
"Loading of method %s failed with status 0x%" PRIx32,
223223
method_name,
224-
method.error());
224+
static_cast<int>(method.error()));
225225
ET_LOG(Info, "Method loaded.");
226226

227227
void* debug_buffer = malloc(FLAGS_debug_buffer_size);
@@ -242,7 +242,7 @@ int main(int argc, char** argv) {
242242
ET_CHECK_MSG(
243243
status == Error::Ok,
244244
"LoadBundledInput failed with status 0x%" PRIx32,
245-
status);
245+
static_cast<int>(status));
246246

247247
ET_LOG(Info, "Inputs prepared.");
248248

@@ -252,7 +252,7 @@ int main(int argc, char** argv) {
252252
status == Error::Ok,
253253
"Execution of method %s failed with status 0x%" PRIx32,
254254
method_name,
255-
status);
255+
static_cast<int>(status));
256256
ET_LOG(Info, "Model executed successfully.");
257257

258258
// Print the outputs.
@@ -294,7 +294,7 @@ int main(int argc, char** argv) {
294294
ET_CHECK_MSG(
295295
status == Error::Ok,
296296
"Bundle verification failed with status 0x%" PRIx32,
297-
status);
297+
static_cast<int>(status));
298298
ET_LOG(Info, "Model verified successfully.");
299299
}
300300

0 commit comments

Comments
 (0)