diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/skey/md4.c | 2 | ||||
-rw-r--r-- | src/terminal-accels.c | 5 | ||||
-rw-r--r-- | src/terminal-app.c | 5 | ||||
-rw-r--r-- | src/terminal-encoding.c | 2 | ||||
-rw-r--r-- | src/terminal-gsettings.c | 2 | ||||
-rw-r--r-- | src/terminal-gsettings.h | 2 | ||||
-rw-r--r-- | src/terminal-options.c | 2 | ||||
-rw-r--r-- | src/terminal-profile.c | 1 | ||||
-rw-r--r-- | src/terminal-util.c | 6 | ||||
-rw-r--r-- | src/terminal-window.c | 11 |
10 files changed, 12 insertions, 26 deletions
diff --git a/src/skey/md4.c b/src/skey/md4.c index 9061581..2335240 100644 --- a/src/skey/md4.c +++ b/src/skey/md4.c @@ -169,7 +169,7 @@ void MD4Final(unsigned char* digest, MD4_CTX *ctx) if (digest!=NULL) memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The three core functions */ diff --git a/src/terminal-accels.c b/src/terminal-accels.c index 9dad3fc..fec1296 100644 --- a/src/terminal-accels.c +++ b/src/terminal-accels.c @@ -335,7 +335,7 @@ enum }; static void keys_change_notify (GSettings *settings, - gchar *key, + const gchar *key, gpointer user_data); static void accel_changed_callback (GtkAccelGroup *accel_group, @@ -473,7 +473,7 @@ update_model_foreach (GtkTreeModel *model, static void keys_change_notify (GSettings *settings, - gchar *key, + const gchar *key, gpointer user_data) { GVariant *val; @@ -663,7 +663,6 @@ static gboolean sync_idle_cb (gpointer data) { GSettings *changeset; - GError *error = NULL; _terminal_debug_print (TERMINAL_DEBUG_ACCELS, "GSettings sync handler\n"); diff --git a/src/terminal-app.c b/src/terminal-app.c index 91b3d02..caf3533 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -364,7 +364,6 @@ terminal_app_get_profile_liststore (TerminalApp *app, GtkListStore *store; GtkTreeIter iter; GList *profiles, *l; - TerminalProfile *default_profile; store = gtk_list_store_new (NUM_COLUMNS, TERMINAL_TYPE_PROFILE); @@ -375,7 +374,6 @@ terminal_app_get_profile_liststore (TerminalApp *app, selected_profile = NULL; profiles = terminal_app_get_profile_list (app); - default_profile = terminal_app_get_default_profile (app); for (l = profiles; l != NULL; l = l->next) { @@ -976,7 +974,6 @@ terminal_app_enable_mnemonics_notify_cb (GSettings *settings, gpointer user_data) { TerminalApp *app = TERMINAL_APP (user_data); - GVariant *settings_value; gboolean enable; enable = g_settings_get_boolean (settings, key); @@ -1311,8 +1308,6 @@ G_DEFINE_TYPE (TerminalApp, terminal_app, G_TYPE_OBJECT) static void terminal_app_init (TerminalApp *app) { - GError *error = NULL; - global_app = app; gtk_window_set_default_icon_name (MATE_TERMINAL_ICON_NAME); diff --git a/src/terminal-encoding.c b/src/terminal-encoding.c index 549af80..9ca8310 100644 --- a/src/terminal-encoding.c +++ b/src/terminal-encoding.c @@ -289,7 +289,7 @@ update_active_encodings_gsettings (void) { GSList *list, *l; GArray *strings; - gchar *id_string; + const gchar *id_string; GSettings *settings; list = terminal_app_get_active_encodings (terminal_app_get ()); diff --git a/src/terminal-gsettings.c b/src/terminal-gsettings.c index 8cbd35e..fdd0163 100644 --- a/src/terminal-gsettings.c +++ b/src/terminal-gsettings.c @@ -96,7 +96,7 @@ terminal_gsettings_remove_all_from_strv (GSettings *settings, /* convert a gchar ** to GList (taken from libmatekbd code) */ GSList* -terminal_gsettings_strv_to_gslist (gchar **array) +terminal_gsettings_strv_to_gslist (const gchar *const *array) { GSList *list = NULL; gint i; diff --git a/src/terminal-gsettings.h b/src/terminal-gsettings.h index 1e7c363..1611c86 100644 --- a/src/terminal-gsettings.h +++ b/src/terminal-gsettings.h @@ -41,7 +41,7 @@ gboolean terminal_gsettings_remove_all_from_strv (GSettings *sett const gchar *key, const gchar *value); -GSList* terminal_gsettings_strv_to_gslist (gchar **array); +GSList* terminal_gsettings_strv_to_gslist (const gchar *const *array); G_END_DECLS diff --git a/src/terminal-options.c b/src/terminal-options.c index 71a4cd8..6881b67 100644 --- a/src/terminal-options.c +++ b/src/terminal-options.c @@ -1019,7 +1019,7 @@ get_goption_context (TerminalOptions *options) G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_maximize_callback, - N_("Maximise the window"), + N_("Maximize the window"), NULL }, { diff --git a/src/terminal-profile.c b/src/terminal-profile.c index bc836f1..67ab041 100644 --- a/src/terminal-profile.c +++ b/src/terminal-profile.c @@ -814,7 +814,6 @@ terminal_profile_save (TerminalProfile *profile) TerminalProfilePrivate *priv = profile->priv; GSettings *changeset; GSList *l; - GError *error = NULL; priv->save_idle_id = 0; changeset = g_settings_new_with_path (CONF_PROFILE_SCHEMA, diff --git a/src/terminal-util.c b/src/terminal-util.c index a909a53..c847595 100644 --- a/src/terminal-util.c +++ b/src/terminal-util.c @@ -47,6 +47,8 @@ #if GTK_CHECK_VERSION(3, 0, 0) #define GDK_WINDOW_XWINDOW GDK_WINDOW_XID #define GDK_DRAWABLE_XID GDK_WINDOW_XID +#else + #define gdk_error_trap_pop_ignored gdk_error_trap_pop #endif void @@ -609,7 +611,7 @@ setup_ignore_host_env (GHashTable *env_table, GSList *ignore; gchar **ignore_strv = g_settings_get_strv (settings, "ignore-hosts"); - ignore = terminal_gsettings_strv_to_gslist (ignore_strv); + ignore = terminal_gsettings_strv_to_gslist ((const gchar *const *)ignore_strv); if (ignore) { GString *buf = g_string_sized_new (64); @@ -1205,7 +1207,7 @@ terminal_util_x11_window_is_minimized (GdkWindow *window) gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE"), 0, G_MAXLONG, False, XA_ATOM, &type, &format, &nitems, &bytes_after, &data); - gdk_error_trap_pop (); + gdk_error_trap_pop_ignored (); if (type != None) { diff --git a/src/terminal-window.c b/src/terminal-window.c index 33ac03c..43333bf 100644 --- a/src/terminal-window.c +++ b/src/terminal-window.c @@ -1178,12 +1178,10 @@ handle_tab_droped_on_desktop (GtkNotebook *source_notebook, gint y, gpointer data) { - TerminalScreen *screen; TerminalWindow *source_window; TerminalWindow *new_window; TerminalWindowPrivate *new_priv; - screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (container)); source_window = TERMINAL_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (source_notebook))); g_return_val_if_fail (TERMINAL_IS_WINDOW (source_window), NULL); @@ -2525,7 +2523,6 @@ close_button_clicked_cb (GtkWidget *tab_label, { GtkWidget *toplevel; TerminalWindow *window; - TerminalWindowPrivate *priv; TerminalScreen *screen; toplevel = gtk_widget_get_toplevel (screen_container); @@ -2536,7 +2533,6 @@ close_button_clicked_cb (GtkWidget *tab_label, return; window = TERMINAL_WINDOW (toplevel); - priv = window->priv; screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (screen_container)); if (confirm_close_window_or_tab (window, screen)) @@ -2891,7 +2887,6 @@ notebook_page_selected_callback (GtkWidget *notebook, TerminalWindowPrivate *priv = window->priv; GtkWidget *widget; TerminalScreen *screen; - TerminalProfile *profile; int old_grid_width, old_grid_height; #if !GTK_CHECK_VERSION (2, 90, 6) GtkWidget *page_widget; @@ -2937,8 +2932,6 @@ notebook_page_selected_callback (GtkWidget *notebook, /* Make sure that the widget is no longer hidden due to the workaround */ gtk_widget_show (widget); - profile = terminal_screen_get_profile (screen); - priv->active_screen = screen; /* Override menubar setting if it wasn't restored from session */ @@ -3856,7 +3849,7 @@ terminal_next_or_previous_profile_cb (GtkAction *action, TerminalWindow *window) { TerminalWindowPrivate *priv = window->priv; - TerminalProfile *active_profile, *new_profile; + TerminalProfile *active_profile, *new_profile = NULL; GList *profiles, *p; const char *name; @@ -4022,7 +4015,6 @@ tabs_next_or_previous_tab_cb (GtkAction *action, { TerminalWindowPrivate *priv = window->priv; GtkNotebookClass *klass; - GtkBindingSet *binding_set; const char *name; guint keyval = 0; @@ -4037,7 +4029,6 @@ tabs_next_or_previous_tab_cb (GtkAction *action, } klass = GTK_NOTEBOOK_GET_CLASS (GTK_NOTEBOOK (priv->notebook)); - binding_set = gtk_binding_set_by_class (klass); gtk_binding_set_activate (gtk_binding_set_by_class (klass), keyval, GDK_CONTROL_MASK, |