applypatch: Add a Makefile to build imgdiff in Chrome OS.

Also fixed some warnings and added check for target_len.

Test: mma; emerge-peppy imgdiff; emerge-nyan imgdiff; sudo emerge imgdiff
Bug: 26866274

Change-Id: Ifbcd3afd6701c769ccf626e33ed94461706f7ee6
This commit is contained in:
Sen Jiang
2016-02-02 16:01:23 +08:00
parent c213a7c1d1
commit 696692a3c9
6 changed files with 39 additions and 4 deletions

View File

@@ -598,7 +598,6 @@ int ReconstructDeflateChunk(ImageChunk* chunk) {
return -1;
}
size_t p = 0;
unsigned char* out = reinterpret_cast<unsigned char*>(malloc(BUFFER_SIZE));
// We only check two combinations of encoder parameters: level 6
@@ -844,7 +843,6 @@ int main(int argc, char** argv) {
}
if (argc != 4) {
usage:
printf("usage: %s [-z] [-b <bonus-file>] <src-img> <tgt-img> <patch-file>\n",
argv[0]);
return 2;