Fix potential warning of printf in main.c of posix and windows (#1440)

This commit is contained in:
Huang Qi 2022-09-01 14:11:00 +08:00 committed by GitHub
parent 9f09e2661f
commit c64186b704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -464,7 +464,8 @@ main(int argc, char *argv[])
else if (!strncmp(argv[0], "--version", 9)) {
uint32 major, minor, patch;
wasm_runtime_get_version(&major, &minor, &patch);
printf("iwasm %u.%u.%u\n", major, minor, patch);
printf("iwasm %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", major, minor,
patch);
return 0;
}
else

View File

@ -342,7 +342,8 @@ main(int argc, char *argv[])
else if (!strncmp(argv[0], "--version", 9)) {
uint32 major, minor, patch;
wasm_runtime_get_version(&major, &minor, &patch);
printf("iwasm %u.%u.%u\n", major, minor, patch);
printf("iwasm %" PRIu32 ".%" PRIu32 ".%" PRIu32 "\n", major, minor,
patch);
return 0;
}
else