Fix -Wunused-variable warning in PNG screenshot code
Global `Viewer` was copied to local `viewer`, and the local should have
been used in this block. Instead, the global was incorrectly used.
gcc-5 warns for this unused variable. gcc-6 and gcc-7 incorrectly do
not warn.
Reported-by: Jayman2000 <https://github.com/dxx-rebirth/dxx-rebirth/issues/375>
Fixes: 131c1b9f4d
("Add support for PNG screenshots")
This commit is contained in:
parent
48b31d84f3
commit
8a16296eb4
|
@ -660,7 +660,7 @@ void record_screenshot_text_metadata(png_struct *const png_ptr, png_info *const
|
|||
t.key = key_viewer_segment;
|
||||
t.text = viewer_segment;
|
||||
t.compression = PNG_TEXT_COMPRESSION_NONE;
|
||||
snprintf(viewer_segment, sizeof(viewer_segment), "%hu", Viewer->segnum);
|
||||
snprintf(viewer_segment, sizeof(viewer_segment), "%hu", viewer->segnum);
|
||||
}
|
||||
}
|
||||
png_set_text(png_ptr, info_ptr, text_fields.data(), idx);
|
||||
|
|
Loading…
Reference in a new issue