summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2016-04-19 00:39:41 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-19 00:39:41 +0200
commit7140a083c7d37a86ae95bb671fd5dd932b272e6b (patch)
tree3fca7568ae457f415fe41088a497f7de328afd54 /updater/install.cpp
parentMerge "Fix IWYU errors." am: 51dcd0d am: 405db92 (diff)
parentMerge "Fix google-runtime-int warnings." am: a1f4a1e am: bcad1d1 (diff)
downloadandroid_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.gz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.bz2
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.lz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.xz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.zst
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.zip
Diffstat (limited to 'updater/install.cpp')
-rw-r--r--updater/install.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index 925604f31..4f5268401 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -602,8 +602,8 @@ Value* PackageExtractFileFn(const char* name, State* state,
v->size = mzGetZipEntryUncompLen(entry);
v->data = reinterpret_cast<char*>(malloc(v->size));
if (v->data == NULL) {
- printf("%s: failed to allocate %ld bytes for %s\n",
- name, (long)v->size, zip_path);
+ printf("%s: failed to allocate %zd bytes for %s\n",
+ name, v->size, zip_path);
goto done1;
}
@@ -992,7 +992,8 @@ Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) {
buffer = reinterpret_cast<char*>(malloc(st.st_size+1));
if (buffer == NULL) {
- ErrorAbort(state, "%s: failed to alloc %lld bytes", name, (long long)st.st_size+1);
+ ErrorAbort(state, "%s: failed to alloc %zu bytes", name,
+ static_cast<size_t>(st.st_size+1));
goto done;
}
@@ -1004,8 +1005,8 @@ Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) {
}
if (ota_fread(buffer, 1, st.st_size, f) != static_cast<size_t>(st.st_size)) {
- ErrorAbort(state, "%s: failed to read %lld bytes from %s",
- name, (long long)st.st_size+1, filename);
+ ErrorAbort(state, "%s: failed to read %zu bytes from %s",
+ name, static_cast<size_t>(st.st_size), filename);
ota_fclose(f);
goto done;
}