Skip to content

Commit

Permalink
Fix LodePNG to avoid -Wcast-qual warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Oct 14, 2022
1 parent db4741f commit 24c830e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all clean

CC := gcc
CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic -Wno-missing-field-initializers
CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic

tools := \
bpp2png \
Expand Down
4 changes: 2 additions & 2 deletions tools/lodepng/lodepng.c
Original file line number Diff line number Diff line change
Expand Up @@ -4618,10 +4618,10 @@ static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecoderSettings*
length, &zlibsettings);
/*error: compressed text larger than decoder->max_text_size*/
if(error && size > zlibsettings.max_output_size) error = 112;
if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)str, size);
if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (const char*)str, size);
lodepng_free(str);
} else {
error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)(data + begin), length);
error = lodepng_add_itext_sized(info, key, langtag, transkey, (const char*)(data + begin), length);
}

break;
Expand Down

0 comments on commit 24c830e

Please sign in to comment.