gsdx: fix warning: variable ‘success’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]

This commit is contained in:
Gregory Hainaut 2017-01-11 18:23:34 +01:00
parent 62c21fd58f
commit f5fbfe98bd

View File

@ -59,7 +59,7 @@ namespace GSPng {
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
png_infop info_ptr = nullptr;
bool success = false;
bool success;
try {
if (png_ptr == nullptr)
throw GSDXRecoverableError();
@ -93,6 +93,8 @@ namespace GSPng {
success = true;
} catch (GSDXRecoverableError&) {
fprintf(stderr, "Failed to write image %s\n", file.c_str());
success = false;
}
if (png_ptr)