summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-02-20 10:50:49 +0100
committerZenWalker <[email protected]>2019-03-15 20:43:00 +0100
commit0c49db9a613c05f1f3d55f0f29e3314ac54ef4e2 (patch)
tree7b06cd29becf1870969a06b098f51050bad01621 /src
parent449753407d3ecf43e3401363557437984c138941 (diff)
downloadmate-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')
-rw-r--r--src/terminal-app.c20
-rw-r--r--src/terminal-options.c1
-rw-r--r--src/terminal-options.h1
3 files changed, 2 insertions, 20 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)
{
diff --git a/src/terminal-options.c b/src/terminal-options.c
index 7b16edb..58ddbe1 100644
--- a/src/terminal-options.c
+++ b/src/terminal-options.c
@@ -723,7 +723,6 @@ terminal_options_parse (const char *working_directory,
options->default_title = NULL;
options->zoom = 1.0;
- options->screen_number = -1;
options->default_working_dir = g_strdup (working_directory);
/* The old -x/--execute option is broken, so we need to pre-scan for it. */
diff --git a/src/terminal-options.h b/src/terminal-options.h
index 2d6d707..bc601c3 100644
--- a/src/terminal-options.h
+++ b/src/terminal-options.h
@@ -32,7 +32,6 @@ typedef struct
char **env;
char *startup_id;
char *display_name;
- int screen_number;
GList *initial_windows;
gboolean default_window_menubar_forced;
gboolean default_window_menubar_state;