mirror of https://github.com/PCSX2/pcsx2.git
gsdx: fix warning: variable ‘success’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
This commit is contained in:
parent
62c21fd58f
commit
f5fbfe98bd
|
@ -59,7 +59,7 @@ namespace GSPng {
|
||||||
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
|
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
|
||||||
png_infop info_ptr = nullptr;
|
png_infop info_ptr = nullptr;
|
||||||
|
|
||||||
bool success = false;
|
bool success;
|
||||||
try {
|
try {
|
||||||
if (png_ptr == nullptr)
|
if (png_ptr == nullptr)
|
||||||
throw GSDXRecoverableError();
|
throw GSDXRecoverableError();
|
||||||
|
@ -93,6 +93,8 @@ namespace GSPng {
|
||||||
success = true;
|
success = true;
|
||||||
} catch (GSDXRecoverableError&) {
|
} catch (GSDXRecoverableError&) {
|
||||||
fprintf(stderr, "Failed to write image %s\n", file.c_str());
|
fprintf(stderr, "Failed to write image %s\n", file.c_str());
|
||||||
|
|
||||||
|
success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (png_ptr)
|
if (png_ptr)
|
||||||
|
|
Loading…
Reference in New Issue