Fix compiler warnings: clobber variables
This patchs fixes warnings generated by older toolchains: shared/image-loader.c: In function 'load_png': shared/image-loader.c:211:12: warning: variable 'data' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] png_byte *data = NULL; See https://linux.die.net/man/3/longjmp why is this needed. Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
This commit is contained in:
parent
7d070ca0ba
commit
7a8a3a3547
@ -208,8 +208,8 @@ load_png(FILE *fp)
|
||||
{
|
||||
png_struct *png;
|
||||
png_info *info;
|
||||
png_byte *data = NULL;
|
||||
png_byte **row_pointers = NULL;
|
||||
png_byte *volatile data = NULL;
|
||||
png_byte **volatile row_pointers = NULL;
|
||||
png_uint_32 width, height;
|
||||
int depth, color_type, interlace, stride;
|
||||
unsigned int i;
|
||||
|
Loading…
Reference in New Issue
Block a user