Commit 1b85bf00 authored by Mike Fleetwood's avatar Mike Fleetwood
Browse files

Fix warning from double assigning to gscreen

Compiling GParted on an older distribution with gtk+-3.0 < 3.22.0, where
HAVE_GTK_SHOW_URI_ON_WINDOW is undefined, produces this warning message: In member function 'void GParted::Win_GParted::show_help(const Glib::ustring&, const Glib::ustring&)': warning: operation on 'gscreen' may be undefined [-Wsequence-point]
      GdkScreen *gscreen = gscreen = gdk_screen_get_default();

Found on Ubuntu 16.04 LTS with gtk+ 3.18.0.

Stop double assigning to gscreen.  Fixes commit:
    Replace deprecated gtk_show_uri() method for help window (!82)
parent ba1bafc5
Pipeline #318088 passed with stages
in 33 minutes and 8 seconds
......@@ -1819,7 +1819,7 @@ void Win_GParted::show_help(const Glib::ustring & filename /* E.g., "gparted" */
gtk_show_uri_on_window(NULL, uri.c_str(), gtk_get_current_event_time(), &error);
GdkScreen *gscreen = gscreen = gdk_screen_get_default();
GdkScreen *gscreen = gdk_screen_get_default();
gtk_show_uri(gscreen, uri.c_str(), gtk_get_current_event_time(), &error);
if (error != NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment