summaryrefslogtreecommitdiffstats
path: root/applypatch/imgpatch.c
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-03-14 22:02:33 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-14 22:02:33 +0100
commit52d0b765ab58e7def9783623092f1891a4d7f427 (patch)
tree4531013dc846bac91acdae211592c0e811cfef4e /applypatch/imgpatch.c
parentam a7266ef0: Merge "separate fbdev-specific code out from minui" (diff)
parentMerge "Recovery 64-bit compile issues" (diff)
downloadandroid_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar.gz
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar.bz2
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar.lz
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar.xz
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.tar.zst
android_bootable_recovery-52d0b765ab58e7def9783623092f1891a4d7f427.zip
Diffstat (limited to 'applypatch/imgpatch.c')
-rw-r--r--applypatch/imgpatch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/applypatch/imgpatch.c b/applypatch/imgpatch.c
index 3a1df3872..af4d07281 100644
--- a/applypatch/imgpatch.c
+++ b/applypatch/imgpatch.c
@@ -18,6 +18,7 @@
// format.
#include <stdio.h>
+#include <sys/cdefs.h>
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
@@ -35,7 +36,7 @@
* file, and update the SHA context with the output data as well.
* Return 0 on success.
*/
-int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size,
+int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size __unused,
const Value* patch,
SinkFn sink, void* token, SHA_CTX* ctx,
const Value* bonus_data) {
@@ -132,7 +133,7 @@ int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size,
unsigned char* expanded_source = malloc(expanded_len);
if (expanded_source == NULL) {
- printf("failed to allocate %d bytes for expanded_source\n",
+ printf("failed to allocate %zu bytes for expanded_source\n",
expanded_len);
return -1;
}
@@ -163,7 +164,7 @@ int ApplyImagePatch(const unsigned char* old_data, ssize_t old_size,
// We should have filled the output buffer exactly, except
// for the bonus_size.
if (strm.avail_out != bonus_size) {
- printf("source inflation short by %d bytes\n", strm.avail_out-bonus_size);
+ printf("source inflation short by %zu bytes\n", strm.avail_out-bonus_size);
return -1;
}
inflateEnd(&strm);