summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-23 17:53:30 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-07-23 17:53:30 +0000
commitc53b898a6346156202c04de99acca0d07630eeef (patch)
tree3988b12aa3721e3ae6bac1fb67aba8da8beeb78b
parentb934fcd5a79993246625e73f37040839b443f9d3 (diff)
parent5bca5adce9b32e592598f2cbf304594e9d677eb1 (diff)
Merge "Fix -Wformat warning" into main
-rw-r--r--core/jni/com_android_internal_content_FileSystemUtils.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/core/jni/com_android_internal_content_FileSystemUtils.cpp b/core/jni/com_android_internal_content_FileSystemUtils.cpp
index d426f1240a7f..6c72544a7958 100644
--- a/core/jni/com_android_internal_content_FileSystemUtils.cpp
+++ b/core/jni/com_android_internal_content_FileSystemUtils.cpp
@@ -87,9 +87,10 @@ bool punchHoles(const char *filePath, const uint64_t offset,
IF_ALOGD() {
ALOGD("Total number of LOAD segments %zu", programHeaders.size());
- ALOGD("Size before punching holes st_blocks: %" PRIu64
- ", st_blksize: %d, st_size: %" PRIu64 "",
- beforePunch.st_blocks, beforePunch.st_blksize,
+ ALOGD("Size before punching holes st_blocks: %" PRIu64 ", st_blksize: %" PRIu64
+ ", st_size: %" PRIu64 "",
+ static_cast<uint64_t>(beforePunch.st_blocks),
+ static_cast<uint64_t>(beforePunch.st_blksize),
static_cast<uint64_t>(beforePunch.st_size));
}
@@ -193,9 +194,10 @@ bool punchHoles(const char *filePath, const uint64_t offset,
ALOGD("lstat64 failed for filePath %s, error:%d", filePath, errno);
return false;
}
- ALOGD("Size after punching holes st_blocks: %" PRIu64 ", st_blksize: %d, st_size: %" PRIu64
- "",
- afterPunch.st_blocks, afterPunch.st_blksize,
+ ALOGD("Size after punching holes st_blocks: %" PRIu64 ", st_blksize: %" PRIu64
+ ", st_size: %" PRIu64 "",
+ static_cast<uint64_t>(afterPunch.st_blocks),
+ static_cast<uint64_t>(afterPunch.st_blksize),
static_cast<uint64_t>(afterPunch.st_size));
}
@@ -271,8 +273,9 @@ bool punchHolesInZip(const char *filePath, uint64_t offset, uint16_t extraFieldL
uint64_t blockSize = beforePunch.st_blksize;
IF_ALOGD() {
ALOGD("Extra field length: %hu, Size before punching holes st_blocks: %" PRIu64
- ", st_blksize: %d, st_size: %" PRIu64 "",
- extraFieldLen, beforePunch.st_blocks, beforePunch.st_blksize,
+ ", st_blksize: %" PRIu64 ", st_size: %" PRIu64 "",
+ extraFieldLen, static_cast<uint64_t>(beforePunch.st_blocks),
+ static_cast<uint64_t>(beforePunch.st_blksize),
static_cast<uint64_t>(beforePunch.st_size));
}
@@ -346,8 +349,9 @@ bool punchHolesInZip(const char *filePath, uint64_t offset, uint16_t extraFieldL
return false;
}
ALOGD("punchHolesInApk:: Size after punching holes st_blocks: %" PRIu64
- ", st_blksize: %d, st_size: %" PRIu64 "",
- afterPunch.st_blocks, afterPunch.st_blksize,
+ ", st_blksize: %" PRIu64 ", st_size: %" PRIu64 "",
+ static_cast<uint64_t>(afterPunch.st_blocks),
+ static_cast<uint64_t>(afterPunch.st_blksize),
static_cast<uint64_t>(afterPunch.st_size));
}
return true;