From f5fbfe98bdf1d794fcfabad36d5641a5aec743ff Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 11 Jan 2017 18:23:34 +0100 Subject: [PATCH] =?UTF-8?q?gsdx:=20fix=20warning:=20variable=20=E2=80=98su?= =?UTF-8?q?ccess=E2=80=99=20might=20be=20clobbered=20by=20=E2=80=98longjmp?= =?UTF-8?q?=E2=80=99=20or=20=E2=80=98vfork=E2=80=99=20[-Wclobbered]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/GSdx/GSPng.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSPng.cpp b/plugins/GSdx/GSPng.cpp index 820bb42173..d4caf52edf 100644 --- a/plugins/GSdx/GSPng.cpp +++ b/plugins/GSdx/GSPng.cpp @@ -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)