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:
Win_GParted.cc: In member function 'void GParted::Win_GParted::show_help(const Glib::ustring&, const Glib::ustring&)':
Win_GParted.cc:1822:56: 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:
26f4dc504a
Replace deprecated gtk_show_uri() method for help window (!82)
This commit is contained in:
parent
ba1bafc5ac
commit
1b85bf00cf
|
@ -1819,7 +1819,7 @@ void Win_GParted::show_help(const Glib::ustring & filename /* E.g., "gparted" */
|
||||||
// https://gitlab.gnome.org/GNOME/gparted/-/merge_requests/82#note_1106114
|
// https://gitlab.gnome.org/GNOME/gparted/-/merge_requests/82#note_1106114
|
||||||
gtk_show_uri_on_window(NULL, uri.c_str(), gtk_get_current_event_time(), &error);
|
gtk_show_uri_on_window(NULL, uri.c_str(), gtk_get_current_event_time(), &error);
|
||||||
#else
|
#else
|
||||||
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);
|
gtk_show_uri(gscreen, uri.c_str(), gtk_get_current_event_time(), &error);
|
||||||
#endif
|
#endif
|
||||||
if (error != NULL)
|
if (error != NULL)
|
||||||
|
|
Loading…
Reference in New Issue