Skip to content

Commit

Permalink
Merge pull request google#54 from pornel/warnings
Browse files Browse the repository at this point in the history
Warnings--
  • Loading branch information
lvandeve committed May 12, 2015
2 parents 5cebcf3 + 9f4b110 commit f221cb1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/zopfli/deflate.c
Expand Up @@ -536,7 +536,7 @@ static void AddLZ77Block(const ZopfliOptions* options, int btype, int final,
unsigned d_lengths[32];
unsigned ll_symbols[288];
unsigned d_symbols[32];
size_t detect_block_size = *outsize;
size_t detect_block_size;
size_t compressed_size;
size_t uncompressed_size = 0;
size_t i;
Expand Down
12 changes: 2 additions & 10 deletions src/zopflipng/lodepng/lodepng.cpp
Expand Up @@ -5165,16 +5165,8 @@ static void filterScanline(unsigned char* out, const unsigned char* scanline, co
for(i = 0; i < length; i++) out[i] = scanline[i];
break;
case 1: /*Sub*/
if(prevline)
{
for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth];
}
else
{
for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth];
}
for(i = 0; i < bytewidth; i++) out[i] = scanline[i];
for(i = bytewidth; i < length; i++) out[i] = scanline[i] - scanline[i - bytewidth];
break;
case 2: /*Up*/
if(prevline)
Expand Down
3 changes: 1 addition & 2 deletions src/zopflipng/zopflipng_bin.cc
Expand Up @@ -151,7 +151,6 @@ int main(int argc, char *argv[]) {
std::string prefix = "zopfli_"; // prefix for output filenames

std::vector<std::string> files;
std::vector<char> options;
for (int i = 1; i < argc; i++) {
std::string arg = argv[i];
if (arg[0] == '-' && arg.size() > 1 && arg[1] != '-') {
Expand Down Expand Up @@ -293,7 +292,7 @@ int main(int argc, char *argv[]) {
error = ZopfliPNGOptimize(origpng, png_options, true, &resultpng);

if (error) {
printf("Decoding error %i: %s\n", error, lodepng_error_text(error));
printf("Decoding error %u: %s\n", error, lodepng_error_text(error));
}

// Verify result, check that the result causes no decoding errors
Expand Down
2 changes: 1 addition & 1 deletion src/zopflipng/zopflipng_lib.cc
Expand Up @@ -371,7 +371,7 @@ int ZopfliPNGOptimize(const std::vector<unsigned char>& origpng,

if (error) {
if (verbose) {
printf("Decoding error %i: %s\n", error, lodepng_error_text(error));
printf("Decoding error %u: %s\n", error, lodepng_error_text(error));
}
return error;
}
Expand Down

0 comments on commit f221cb1

Please sign in to comment.