comparison src/libgfx.c @ 1304:e968b259605b

Fix a warning about potentially clobbered variable due to setjmp() use.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 19 Aug 2017 12:15:01 +0300
parents be30466fbc47
children
comparison
equal deleted inserted replaced
1303:be30466fbc47 1304:e968b259605b
392 392
393 int dmWritePNGImageFILE(FILE *fp, DMImage *img, const DMImageConvSpec *spec) 393 int dmWritePNGImageFILE(FILE *fp, DMImage *img, const DMImageConvSpec *spec)
394 { 394 {
395 png_structp png_ptr = NULL; 395 png_structp png_ptr = NULL;
396 png_infop info_ptr = NULL; 396 png_infop info_ptr = NULL;
397 int fmt, res = DMERR_OK; 397 int fmt, res;
398 398
399 // Create PNG structures 399 // Create PNG structures
400 png_ptr = png_create_write_struct( 400 png_ptr = png_create_write_struct(
401 PNG_LIBPNG_VER_STRING, 401 PNG_LIBPNG_VER_STRING,
402 NULL, NULL, NULL); 402 NULL, NULL, NULL);
422 res = dmError(DMERR_INIT_FAIL, 422 res = dmError(DMERR_INIT_FAIL,
423 "PNG: Error during image writing..\n"); 423 "PNG: Error during image writing..\n");
424 goto error; 424 goto error;
425 } 425 }
426 426
427 res = DMERR_OK;
427 png_init_io(png_ptr, fp); 428 png_init_io(png_ptr, fp);
428 429
429 // Write PNG header info 430 // Write PNG header info
430 switch (spec->format) 431 switch (spec->format)
431 { 432 {