Permalink
Browse files

gsdx: fix warning: variable ‘success’ might be clobbered by ‘longjmp’…

… or ‘vfork’ [-Wclobbered]
  • Loading branch information...
1 parent 62c21fd commit f5fbfe98bdf1d794fcfabad36d5641a5aec743ff @gregory38 gregory38 committed Jan 11, 2017
Showing with 3 additions and 1 deletion.
  1. +3 −1 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;
@gregory38
gregory38 Jan 11, 2017 Contributor

Oh, I really need to reformat GSdx with clang.

@FlatOutPS2
FlatOutPS2 Jan 11, 2017 Member

Oh, I really need to reformat GSdx with clang.

And the rest of the project. :P

}
if (png_ptr)

0 comments on commit f5fbfe9

Please sign in to comment.