Fix some warnings.

master-1.22
Mark Thomas 2014-02-12 00:05:23 +00:00
parent 393743c91f
commit d6483a80a9
9 changed files with 11 additions and 25 deletions

View File

@ -169,7 +169,7 @@ void MD4Final(unsigned char* digest, MD4_CTX *ctx)
if (digest!=NULL) if (digest!=NULL)
memcpy(digest, ctx->buf, 16); 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 */ /* The three core functions */

View File

@ -335,7 +335,7 @@ enum
}; };
static void keys_change_notify (GSettings *settings, static void keys_change_notify (GSettings *settings,
gchar *key, const gchar *key,
gpointer user_data); gpointer user_data);
static void accel_changed_callback (GtkAccelGroup *accel_group, static void accel_changed_callback (GtkAccelGroup *accel_group,
@ -473,7 +473,7 @@ update_model_foreach (GtkTreeModel *model,
static void static void
keys_change_notify (GSettings *settings, keys_change_notify (GSettings *settings,
gchar *key, const gchar *key,
gpointer user_data) gpointer user_data)
{ {
GVariant *val; GVariant *val;
@ -663,7 +663,6 @@ static gboolean
sync_idle_cb (gpointer data) sync_idle_cb (gpointer data)
{ {
GSettings *changeset; GSettings *changeset;
GError *error = NULL;
_terminal_debug_print (TERMINAL_DEBUG_ACCELS, _terminal_debug_print (TERMINAL_DEBUG_ACCELS,
"GSettings sync handler\n"); "GSettings sync handler\n");

View File

@ -364,7 +364,6 @@ terminal_app_get_profile_liststore (TerminalApp *app,
GtkListStore *store; GtkListStore *store;
GtkTreeIter iter; GtkTreeIter iter;
GList *profiles, *l; GList *profiles, *l;
TerminalProfile *default_profile;
store = gtk_list_store_new (NUM_COLUMNS, TERMINAL_TYPE_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; selected_profile = NULL;
profiles = terminal_app_get_profile_list (app); profiles = terminal_app_get_profile_list (app);
default_profile = terminal_app_get_default_profile (app);
for (l = profiles; l != NULL; l = l->next) for (l = profiles; l != NULL; l = l->next)
{ {
@ -976,7 +974,6 @@ terminal_app_enable_mnemonics_notify_cb (GSettings *settings,
gpointer user_data) gpointer user_data)
{ {
TerminalApp *app = TERMINAL_APP (user_data); TerminalApp *app = TERMINAL_APP (user_data);
GVariant *settings_value;
gboolean enable; gboolean enable;
enable = g_settings_get_boolean (settings, key); enable = g_settings_get_boolean (settings, key);
@ -1311,8 +1308,6 @@ G_DEFINE_TYPE (TerminalApp, terminal_app, G_TYPE_OBJECT)
static void static void
terminal_app_init (TerminalApp *app) terminal_app_init (TerminalApp *app)
{ {
GError *error = NULL;
global_app = app; global_app = app;
gtk_window_set_default_icon_name (MATE_TERMINAL_ICON_NAME); gtk_window_set_default_icon_name (MATE_TERMINAL_ICON_NAME);

View File

@ -289,7 +289,7 @@ update_active_encodings_gsettings (void)
{ {
GSList *list, *l; GSList *list, *l;
GArray *strings; GArray *strings;
gchar *id_string; const gchar *id_string;
GSettings *settings; GSettings *settings;
list = terminal_app_get_active_encodings (terminal_app_get ()); list = terminal_app_get_active_encodings (terminal_app_get ());

View File

@ -96,7 +96,7 @@ terminal_gsettings_remove_all_from_strv (GSettings *settings,
/* convert a gchar ** to GList (taken from libmatekbd code) */ /* convert a gchar ** to GList (taken from libmatekbd code) */
GSList* GSList*
terminal_gsettings_strv_to_gslist (gchar **array) terminal_gsettings_strv_to_gslist (const gchar *const *array)
{ {
GSList *list = NULL; GSList *list = NULL;
gint i; gint i;

View File

@ -41,7 +41,7 @@ gboolean terminal_gsettings_remove_all_from_strv (GSettings *sett
const gchar *key, const gchar *key,
const gchar *value); const gchar *value);
GSList* terminal_gsettings_strv_to_gslist (gchar **array); GSList* terminal_gsettings_strv_to_gslist (const gchar *const *array);
G_END_DECLS G_END_DECLS

View File

@ -814,7 +814,6 @@ terminal_profile_save (TerminalProfile *profile)
TerminalProfilePrivate *priv = profile->priv; TerminalProfilePrivate *priv = profile->priv;
GSettings *changeset; GSettings *changeset;
GSList *l; GSList *l;
GError *error = NULL;
priv->save_idle_id = 0; priv->save_idle_id = 0;
changeset = g_settings_new_with_path (CONF_PROFILE_SCHEMA, changeset = g_settings_new_with_path (CONF_PROFILE_SCHEMA,

View File

@ -47,6 +47,8 @@
#if GTK_CHECK_VERSION(3, 0, 0) #if GTK_CHECK_VERSION(3, 0, 0)
#define GDK_WINDOW_XWINDOW GDK_WINDOW_XID #define GDK_WINDOW_XWINDOW GDK_WINDOW_XID
#define GDK_DRAWABLE_XID GDK_WINDOW_XID #define GDK_DRAWABLE_XID GDK_WINDOW_XID
#else
#define gdk_error_trap_pop_ignored gdk_error_trap_pop
#endif #endif
void void
@ -609,7 +611,7 @@ setup_ignore_host_env (GHashTable *env_table,
GSList *ignore; GSList *ignore;
gchar **ignore_strv = g_settings_get_strv (settings, "ignore-hosts"); 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) if (ignore)
{ {
GString *buf = g_string_sized_new (64); 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"), gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE"),
0, G_MAXLONG, False, XA_ATOM, &type, &format, &nitems, 0, G_MAXLONG, False, XA_ATOM, &type, &format, &nitems,
&bytes_after, &data); &bytes_after, &data);
gdk_error_trap_pop (); gdk_error_trap_pop_ignored ();
if (type != None) if (type != None)
{ {

View File

@ -1175,12 +1175,10 @@ handle_tab_droped_on_desktop (GtkNotebook *source_notebook,
gint y, gint y,
gpointer data) gpointer data)
{ {
TerminalScreen *screen;
TerminalWindow *source_window; TerminalWindow *source_window;
TerminalWindow *new_window; TerminalWindow *new_window;
TerminalWindowPrivate *new_priv; 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))); source_window = TERMINAL_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (source_notebook)));
g_return_val_if_fail (TERMINAL_IS_WINDOW (source_window), NULL); g_return_val_if_fail (TERMINAL_IS_WINDOW (source_window), NULL);
@ -2513,7 +2511,6 @@ close_button_clicked_cb (GtkWidget *tab_label,
{ {
GtkWidget *toplevel; GtkWidget *toplevel;
TerminalWindow *window; TerminalWindow *window;
TerminalWindowPrivate *priv;
TerminalScreen *screen; TerminalScreen *screen;
toplevel = gtk_widget_get_toplevel (screen_container); toplevel = gtk_widget_get_toplevel (screen_container);
@ -2524,7 +2521,6 @@ close_button_clicked_cb (GtkWidget *tab_label,
return; return;
window = TERMINAL_WINDOW (toplevel); window = TERMINAL_WINDOW (toplevel);
priv = window->priv;
screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (screen_container)); screen = terminal_screen_container_get_screen (TERMINAL_SCREEN_CONTAINER (screen_container));
if (confirm_close_window_or_tab (window, screen)) if (confirm_close_window_or_tab (window, screen))
@ -2879,7 +2875,6 @@ notebook_page_selected_callback (GtkWidget *notebook,
TerminalWindowPrivate *priv = window->priv; TerminalWindowPrivate *priv = window->priv;
GtkWidget *widget; GtkWidget *widget;
TerminalScreen *screen; TerminalScreen *screen;
TerminalProfile *profile;
int old_grid_width, old_grid_height; int old_grid_width, old_grid_height;
#if !GTK_CHECK_VERSION (2, 90, 6) #if !GTK_CHECK_VERSION (2, 90, 6)
GtkWidget *page_widget; GtkWidget *page_widget;
@ -2925,8 +2920,6 @@ notebook_page_selected_callback (GtkWidget *notebook,
/* Make sure that the widget is no longer hidden due to the workaround */ /* Make sure that the widget is no longer hidden due to the workaround */
gtk_widget_show (widget); gtk_widget_show (widget);
profile = terminal_screen_get_profile (screen);
priv->active_screen = screen; priv->active_screen = screen;
/* Override menubar setting if it wasn't restored from session */ /* Override menubar setting if it wasn't restored from session */
@ -3844,7 +3837,7 @@ terminal_next_or_previous_profile_cb (GtkAction *action,
TerminalWindow *window) TerminalWindow *window)
{ {
TerminalWindowPrivate *priv = window->priv; TerminalWindowPrivate *priv = window->priv;
TerminalProfile *active_profile, *new_profile; TerminalProfile *active_profile, *new_profile = NULL;
GList *profiles, *p; GList *profiles, *p;
const char *name; const char *name;
@ -4010,7 +4003,6 @@ tabs_next_or_previous_tab_cb (GtkAction *action,
{ {
TerminalWindowPrivate *priv = window->priv; TerminalWindowPrivate *priv = window->priv;
GtkNotebookClass *klass; GtkNotebookClass *klass;
GtkBindingSet *binding_set;
const char *name; const char *name;
guint keyval = 0; guint keyval = 0;
@ -4025,7 +4017,6 @@ tabs_next_or_previous_tab_cb (GtkAction *action,
} }
klass = GTK_NOTEBOOK_GET_CLASS (GTK_NOTEBOOK (priv->notebook)); 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), gtk_binding_set_activate (gtk_binding_set_by_class (klass),
keyval, keyval,
GDK_CONTROL_MASK, GDK_CONTROL_MASK,