diff options
author | rbuj <[email protected]> | 2019-02-20 10:50:49 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-03-15 20:43:00 +0100 |
commit | 0c49db9a613c05f1f3d55f0f29e3314ac54ef4e2 (patch) | |
tree | 7b06cd29becf1870969a06b098f51050bad01621 /src/terminal-app.c | |
parent | 449753407d3ecf43e3401363557437984c138941 (diff) | |
download | mate-terminal-0c49db9a613c05f1f3d55f0f29e3314ac54ef4e2.tar.bz2 mate-terminal-0c49db9a613c05f1f3d55f0f29e3314ac54ef4e2.tar.xz |
warning: Value stored to 'screen_number' is never read
$ scan-build --keep-cc make
terminal-app.c:249:5: warning: Value stored to 'screen_number' is never read
screen_number = n;
^ ~
Diffstat (limited to 'src/terminal-app.c')
-rw-r--r-- | src/terminal-app.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/terminal-app.c b/src/terminal-app.c index 5e5989c..73870ce 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -221,14 +221,11 @@ gsettings_remove_all_from_strv (GSettings *settings, /* Helper functions */ static GdkScreen* -terminal_app_get_screen_by_display_name (const char *display_name, - int screen_number) +terminal_app_get_screen_by_display_name (const char *display_name) { GdkDisplay *display = NULL; GdkScreen *screen = NULL; - /* --screen=screen_number overrides --display */ - if (display_name == NULL) display = gdk_display_get_default (); else @@ -237,18 +234,6 @@ terminal_app_get_screen_by_display_name (const char *display_name, const char *period; period = strrchr (display_name, '.'); - if (period) - { - gulong n; - char *end; - - errno = 0; - end = NULL; - n = g_ascii_strtoull (period + 1, &end, 0); - if (errno == 0 && (period + 1) != end) - screen_number = n; - } - displays = gdk_display_manager_list_displays (gdk_display_manager_get ()); for (l = displays; l != NULL; l = l->next) { @@ -1730,8 +1715,7 @@ terminal_app_handle_options (TerminalApp *app, GList *lw; GdkScreen *gdk_screen; - gdk_screen = terminal_app_get_screen_by_display_name (options->display_name, - options->screen_number); + gdk_screen = terminal_app_get_screen_by_display_name (options->display_name); if (options->save_config) { |