Merge "bootable/recovery: cleanup compiler warnings (unused value)"
This commit is contained in:
@@ -321,6 +321,10 @@ unsigned char* ReadZip(const char* filename,
|
|||||||
// -15 means we are decoding a 'raw' deflate stream; zlib will
|
// -15 means we are decoding a 'raw' deflate stream; zlib will
|
||||||
// not expect zlib headers.
|
// not expect zlib headers.
|
||||||
int ret = inflateInit2(&strm, -15);
|
int ret = inflateInit2(&strm, -15);
|
||||||
|
if (ret < 0) {
|
||||||
|
printf("failed to initialize inflate: %d\n", ret);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
strm.avail_out = curr->len;
|
strm.avail_out = curr->len;
|
||||||
strm.next_out = curr->data;
|
strm.next_out = curr->data;
|
||||||
@@ -446,6 +450,10 @@ unsigned char* ReadImage(const char* filename,
|
|||||||
// -15 means we are decoding a 'raw' deflate stream; zlib will
|
// -15 means we are decoding a 'raw' deflate stream; zlib will
|
||||||
// not expect zlib headers.
|
// not expect zlib headers.
|
||||||
int ret = inflateInit2(&strm, -15);
|
int ret = inflateInit2(&strm, -15);
|
||||||
|
if (ret < 0) {
|
||||||
|
printf("failed to initialize inflate: %d\n", ret);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
strm.avail_out = allocated - curr->len;
|
strm.avail_out = allocated - curr->len;
|
||||||
@@ -553,10 +561,18 @@ int TryReconstruction(ImageChunk* chunk, unsigned char* out) {
|
|||||||
int ret;
|
int ret;
|
||||||
ret = deflateInit2(&strm, chunk->level, chunk->method, chunk->windowBits,
|
ret = deflateInit2(&strm, chunk->level, chunk->method, chunk->windowBits,
|
||||||
chunk->memLevel, chunk->strategy);
|
chunk->memLevel, chunk->strategy);
|
||||||
|
if (ret < 0) {
|
||||||
|
printf("failed to initialize deflate: %d\n", ret);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
do {
|
do {
|
||||||
strm.avail_out = BUFFER_SIZE;
|
strm.avail_out = BUFFER_SIZE;
|
||||||
strm.next_out = out;
|
strm.next_out = out;
|
||||||
ret = deflate(&strm, Z_FINISH);
|
ret = deflate(&strm, Z_FINISH);
|
||||||
|
if (ret < 0) {
|
||||||
|
printf("failed to deflate: %d\n", ret);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
size_t have = BUFFER_SIZE - strm.avail_out;
|
size_t have = BUFFER_SIZE - strm.avail_out;
|
||||||
|
|
||||||
if (memcmp(out, chunk->deflate_data+p, have) != 0) {
|
if (memcmp(out, chunk->deflate_data+p, have) != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user