Patch with lots of cleanups for warnings from sparse and the Intel compiler
- From: Kjartan Maraas <kmaraas broadpark no>
- To: gnomecc-list gnome org
- Subject: Patch with lots of cleanups for warnings from sparse and the Intel compiler
- Date: Tue, 01 Nov 2005 22:52:11 +0100
This does the following:
- mark code static when possible
- remove unused code
- make some parts ANSI compliant
- fix some format specifiers
Cheers
Kjartan
? warnings
? warnings-icc
? m4/intltool.m4
Index: capplets/accessibility/at-properties/at-startup-session.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/accessibility/at-properties/at-startup-session.c,v
retrieving revision 1.3
diff -u -p -r1.3 at-startup-session.c
--- capplets/accessibility/at-properties/at-startup-session.c 31 Mar 2004 21:30:22 -0000 1.3
+++ capplets/accessibility/at-properties/at-startup-session.c 1 Nov 2005 21:49:28 -0000
@@ -26,7 +26,7 @@ at_startup_get_list (GConfClient *client
return at_list;
}
-gint
+static gint
at_startup_string_compare (gconstpointer s1, gconstpointer s2)
{
if (s1 && s2) {
Index: capplets/accessibility/keyboard/accessibility-keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/accessibility/keyboard/accessibility-keyboard.c,v
retrieving revision 1.26
diff -u -p -r1.26 accessibility-keyboard.c
--- capplets/accessibility/keyboard/accessibility-keyboard.c 14 Aug 2005 15:30:51 -0000 1.26
+++ capplets/accessibility/keyboard/accessibility-keyboard.c 1 Nov 2005 21:49:28 -0000
@@ -25,6 +25,7 @@
# include <config.h>
#endif
+#include "accessibility-keyboard.h"
#include <gnome.h>
#include <gconf/gconf-client.h>
#include <glade/glade.h>
Index: capplets/common/capplet-stock-icons.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/capplet-stock-icons.c,v
retrieving revision 1.1
diff -u -p -r1.1 capplet-stock-icons.c
--- capplets/common/capplet-stock-icons.c 8 Jan 2003 07:04:40 -0000 1.1
+++ capplets/common/capplet-stock-icons.c 1 Nov 2005 21:49:28 -0000
@@ -80,10 +80,8 @@ capplet_register_stock_icons (GtkIconFac
{
gint i;
GtkIconSource *source;
- GnomeProgram *program;
source = gtk_icon_source_new ();
- program = gnome_program_get ();
for (i = 0; i < G_N_ELEMENTS (items); ++i) {
GtkIconSet *icon_set;
Index: capplets/common/file-transfer-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/file-transfer-dialog.c,v
retrieving revision 1.3
diff -u -p -r1.3 file-transfer-dialog.c
--- capplets/common/file-transfer-dialog.c 7 Jul 2005 22:06:56 -0000 1.3
+++ capplets/common/file-transfer-dialog.c 1 Nov 2005 21:49:28 -0000
@@ -91,7 +91,7 @@ file_transfer_dialog_finalize (GObject *
static void
file_transfer_dialog_update_num_files (FileTransferDialog *dlg)
{
- gchar *str = g_strdup_printf (_("Copying file: %i of %i"),
+ gchar *str = g_strdup_printf (_("Copying file: %u of %u"),
dlg->priv->nth, dlg->priv->total);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (dlg->priv->progress), str);
g_free (str);
Index: capplets/common/gconf-property-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/gconf-property-editor.c,v
retrieving revision 1.48
diff -u -p -r1.48 gconf-property-editor.c
--- capplets/common/gconf-property-editor.c 22 May 2005 15:46:40 -0000 1.48
+++ capplets/common/gconf-property-editor.c 1 Nov 2005 21:49:29 -0000
@@ -1447,7 +1447,7 @@ gconf_peditor_new_enum_toggle (GConfCha
return G_OBJECT (peditor);
}
-gboolean
+static gboolean
peditor_image_set_filename (GConfPropertyEditor *peditor, const gchar *filename)
{
GdkPixbuf *pixbuf = NULL;
@@ -1523,7 +1523,7 @@ peditor_image_set_filename (GConfPropert
return TRUE;
}
-void
+static void
peditor_image_chooser_response_cb (GtkWidget *chooser,
gint response,
GConfPropertyEditor *peditor)
@@ -1561,7 +1561,7 @@ peditor_image_chooser_response_cb (GtkWi
gtk_widget_destroy (chooser);
}
-void
+static void
peditor_image_chooser_update_preview_cb (GtkFileChooser *chooser,
GtkImage *preview)
{
@@ -1582,7 +1582,7 @@ peditor_image_chooser_update_preview_cb
gdk_pixbuf_unref (pixbuf);
}
-void
+static void
peditor_image_clicked_cb (GConfPropertyEditor *peditor, GtkButton *button)
{
GConfValue *value = NULL, *value_wid;
Index: capplets/common/gnome-theme-info.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/common/gnome-theme-info.c,v
retrieving revision 1.21
diff -u -p -r1.21 gnome-theme-info.c
--- capplets/common/gnome-theme-info.c 11 Oct 2005 11:27:36 -0000 1.21
+++ capplets/common/gnome-theme-info.c 1 Nov 2005 21:49:29 -0000
@@ -964,7 +964,6 @@ top_theme_dir_changed (GnomeVFSMonitorHa
else if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED)
{
gchar *name;
- CommonThemeDirMonitorData *monitor_data;
name = gnome_vfs_uri_extract_short_name (common_theme_dir_uri);
monitor_data = g_hash_table_lookup (handle_hash, name);
@@ -1016,7 +1015,6 @@ top_icon_theme_dir_changed (GnomeVFSMoni
else if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED)
{
gchar *name;
- CommonIconThemeDirMonitorData *monitor_data;
name = gnome_vfs_uri_extract_short_name (common_icon_theme_dir_uri);
monitor_data = g_hash_table_lookup (handle_hash, name);
Index: capplets/default-applications/gnome-default-applications-properties-structs.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/default-applications/gnome-default-applications-properties-structs.c,v
retrieving revision 1.19
diff -u -p -r1.19 gnome-default-applications-properties-structs.c
--- capplets/default-applications/gnome-default-applications-properties-structs.c 20 Oct 2005 11:29:10 -0000 1.19
+++ capplets/default-applications/gnome-default-applications-properties-structs.c 1 Nov 2005 21:49:29 -0000
@@ -5,7 +5,7 @@ struct _BrowserDescription {
gboolean needs_term;
gboolean in_path;
};
-BrowserDescription possible_browsers[] = {
+static BrowserDescription possible_browsers[] = {
{ N_("Debian Sensible Browser"), "sensible-browser", "sensible-browser %s", FALSE, FALSE },
{ N_("Epiphany"), "epiphany", "epiphany %s", FALSE, FALSE },
{ N_("Galeon"), "galeon", "galeon %s", FALSE, FALSE },
@@ -28,7 +28,7 @@ struct _MailerDescription {
gboolean needs_term;
gboolean in_path;
};
-MailerDescription possible_mailers[] = {
+static MailerDescription possible_mailers[] = {
/* The code in gnome-default-applications-properties.c makes sure
* there is only one (the first entry in this list) Evolution entry
* in the list shown to the user
@@ -55,7 +55,7 @@ struct _TerminalDesciption {
gchar const *exec_arg;
gboolean in_path;
};
-TerminalDescription possible_terminals[] = {
+static TerminalDescription possible_terminals[] = {
{ N_("Debian Terminal Emulator"), "x-terminal-emulator", "-e", FALSE },
{ N_("GNOME Terminal"), "gnome-terminal", "-x", FALSE },
{ N_("Standard XTerminal"), "xterm", "-e", FALSE },
Index: capplets/display/main.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/display/main.c,v
retrieving revision 1.18
diff -u -p -r1.18 main.c
--- capplets/display/main.c 25 Jul 2005 11:55:06 -0000 1.18
+++ capplets/display/main.c 1 Nov 2005 21:49:29 -0000
@@ -44,7 +44,7 @@ struct DisplayInfo {
static void generate_rate_menu (struct ScreenInfo *screen_info);
static void generate_resolution_menu(struct ScreenInfo* screen_info);
-struct DisplayInfo *
+static struct DisplayInfo *
read_display_info (GdkDisplay *display)
{
struct DisplayInfo *info;
@@ -77,7 +77,7 @@ read_display_info (GdkDisplay *display)
return info;
}
-void
+static void
update_display_info (struct DisplayInfo *info, GdkDisplay *display)
{
struct ScreenInfo *screen_info;
@@ -586,13 +586,13 @@ struct TimeoutData {
gboolean timed_out;
};
-char *
+static char *
timeout_string (int time)
{
return g_strdup_printf (ngettext ("Testing the new settings. If you don't respond in %d second the previous settings will be restored.", "Testing the new settings. If you don't respond in %d seconds the previous settings will be restored.", time), time);
}
-gboolean
+static gboolean
save_timeout_callback (gpointer _data)
{
struct TimeoutData *data = _data;
Index: capplets/font/main.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/font/main.c,v
retrieving revision 1.32
diff -u -p -r1.32 main.c
--- capplets/font/main.c 22 May 2005 15:11:44 -0000 1.32
+++ capplets/font/main.c 1 Nov 2005 21:49:29 -0000
@@ -232,9 +232,9 @@ setup_font_sample (GtkWidget *darea,
FcPatternDestroy (pattern);
if (font1)
- XftTextExtentsUtf8 (xdisplay, font1, (char *)string1, strlen (string1), &extents1);
+ XftTextExtentsUtf8 (xdisplay, font1, (unsigned char *)string1, strlen (string1), &extents1);
if (font2)
- XftTextExtentsUtf8 (xdisplay, font2, (char *)string2, strlen (string2), &extents2);
+ XftTextExtentsUtf8 (xdisplay, font2, (unsigned char *)string2, strlen (string2), &extents2);
ascent = 0;
if (font1)
@@ -271,11 +271,11 @@ setup_font_sample (GtkWidget *darea,
if (font1)
XftDrawStringUtf8 (draw, &black, font1,
2, 2 + ascent,
- (char *)string1, strlen (string1));
+ (unsigned char *)string1, strlen (string1));
if (font2)
XftDrawStringUtf8 (draw, &black, font2,
2 + extents1.xOff, 2 + ascent,
- (char *)string2, strlen (string2));
+ (unsigned char *)string2, strlen (string2));
XftDrawDestroy (draw);
Index: capplets/keybindings/eggcellrendererkeys.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keybindings/eggcellrendererkeys.c,v
retrieving revision 1.17
diff -u -p -r1.17 eggcellrendererkeys.c
--- capplets/keybindings/eggcellrendererkeys.c 8 Feb 2005 22:42:10 -0000 1.17
+++ capplets/keybindings/eggcellrendererkeys.c 1 Nov 2005 21:49:29 -0000
@@ -628,7 +628,6 @@ egg_cell_renderer_keys_set_accelerator (
{
char *text;
gboolean changed;
- GtkCellRendererText *celltext;
g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys));
@@ -663,12 +662,10 @@ egg_cell_renderer_keys_set_accelerator (
if (changed)
{
/* sync string to the key values */
- celltext = GTK_CELL_RENDERER_TEXT (keys);
text = convert_keysym_state_to_string (keys->accel_key, keys->keycode, keys->accel_mask);
g_object_set (keys, "text", text, NULL);
g_free (text);
}
-
}
void
Index: capplets/keybindings/gnome-keybinding-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keybindings/gnome-keybinding-properties.c,v
retrieving revision 1.50
diff -u -p -r1.50 gnome-keybinding-properties.c
--- capplets/keybindings/gnome-keybinding-properties.c 22 May 2005 15:46:41 -0000 1.50
+++ capplets/keybindings/gnome-keybinding-properties.c 1 Nov 2005 21:49:29 -0000
@@ -38,7 +38,7 @@ typedef struct
gint data;
} KeyListEntry;
-const KeyListEntry desktop_key_list[] =
+static const KeyListEntry desktop_key_list[] =
{
{ "/apps/gnome_settings_daemon/keybindings/help", ALWAYS_VISIBLE, 0 },
{ "/apps/gnome_settings_daemon/keybindings/power", ALWAYS_VISIBLE, 0 },
@@ -59,7 +59,7 @@ const KeyListEntry desktop_key_list[] =
#endif
{ NULL }
};
-const KeyListEntry sounds_key_list[] =
+static const KeyListEntry sounds_key_list[] =
{
{ "/apps/gnome_settings_daemon/keybindings/volume_mute", ALWAYS_VISIBLE, 0 },
{ "/apps/gnome_settings_daemon/keybindings/volume_down", ALWAYS_VISIBLE, 0 },
@@ -74,7 +74,7 @@ const KeyListEntry sounds_key_list[] =
{ NULL }
};
-const KeyListEntry metacity_key_list[] =
+static const KeyListEntry metacity_key_list[] =
{
{ "/apps/metacity/window_keybindings/activate_window_menu", ALWAYS_VISIBLE, 0 },
{ "/apps/metacity/window_keybindings/toggle_fullscreen", ALWAYS_VISIBLE, 0 },
@@ -442,7 +442,6 @@ should_show_key (const KeyListEntry *ent
return TRUE;
else
return FALSE;
- break;
}
return FALSE;
Index: capplets/keyboard/gnome-keyboard-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/keyboard/gnome-keyboard-properties.c,v
retrieving revision 1.39
diff -u -p -r1.39 gnome-keyboard-properties.c
--- capplets/keyboard/gnome-keyboard-properties.c 22 May 2005 15:46:41 -0000 1.39
+++ capplets/keyboard/gnome-keyboard-properties.c 1 Nov 2005 21:49:29 -0000
@@ -127,11 +127,8 @@ setup_dialog (GladeXML *dialog,
GConfChangeSet *changeset)
{
GObject *peditor;
- GnomeProgram *program;
/* load all the images */
- program = gnome_program_get ();
-
capplet_init_stock_icons ();
peditor = gconf_peditor_new_boolean
Index: capplets/mouse/gnome-mouse-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/mouse/gnome-mouse-properties.c,v
retrieving revision 1.63
diff -u -p -r1.63 gnome-mouse-properties.c
--- capplets/mouse/gnome-mouse-properties.c 24 Oct 2005 10:12:09 -0000 1.63
+++ capplets/mouse/gnome-mouse-properties.c 1 Nov 2005 21:49:29 -0000
@@ -108,7 +108,7 @@ enum
/* State in testing the double-click speed. Global for a great deal of
* convenience
*/
-gint double_click_state = DOUBLE_CLICK_TEST_OFF;
+static gint double_click_state = DOUBLE_CLICK_TEST_OFF;
/* normalilzation routines */
/* All of our scales but double_click are on the range 1->10 as a result, we
@@ -847,16 +847,11 @@ setup_dialog (GladeXML *dialog, GConfCha
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GConfValue *value;
- GnomeProgram *program;
gchar *cursor_font;
- gboolean found_default;
gchar *message;
GConfClient *client = gconf_client_get_default ();
- program = gnome_program_get ();
- found_default = FALSE;
-
/* Buttons page */
/* Left-handed toggle */
peditor = gconf_peditor_new_boolean
@@ -888,7 +883,7 @@ setup_dialog (GladeXML *dialog, GConfCha
/* Cursors page */
tree_view = WID ("cursor_tree");
cursor_font = read_cursor_font ();
-
+
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
model = (GtkTreeModel *) gtk_tree_model_sort_new_with_model (model);
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view),
Index: capplets/theme-switcher/gnome-theme-details.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/theme-switcher/gnome-theme-details.c,v
retrieving revision 1.19
diff -u -p -r1.19 gnome-theme-details.c
--- capplets/theme-switcher/gnome-theme-details.c 22 May 2005 15:46:42 -0000 1.19
+++ capplets/theme-switcher/gnome-theme-details.c 1 Nov 2005 21:49:29 -0000
@@ -270,7 +270,6 @@ void
gnome_theme_details_init (void)
{
GtkWidget *parent, *widget;
- GnomeWindowManager *window_manager;
GladeXML *dialog;
if (theme_details_initted)
@@ -278,7 +277,6 @@ gnome_theme_details_init (void)
theme_details_initted = TRUE;
dialog = gnome_theme_manager_get_theme_dialog ();
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
parent = WID ("theme_details_dialog");
setup_tree_view (GTK_TREE_VIEW (WID ("control_theme_treeview")),
@@ -359,7 +357,6 @@ gnome_theme_details_reread_themes_from_d
GList *string_list;
GList *list;
GnomeWindowManager *window_manager;
- GtkWidget *notebook;
gboolean have_gtk_theme;
gboolean have_window_theme;
@@ -370,7 +367,6 @@ gnome_theme_details_reread_themes_from_d
dialog = gnome_theme_manager_get_theme_dialog ();
window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- notebook = WID ("theme_notebook");
/* First, we update the GTK+ themes page */
theme_list = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2);
Index: capplets/theme-switcher/gnome-theme-installer.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/theme-switcher/gnome-theme-installer.c,v
retrieving revision 1.17
diff -u -p -r1.17 gnome-theme-installer.c
--- capplets/theme-switcher/gnome-theme-installer.c 24 Oct 2005 09:29:34 -0000 1.17
+++ capplets/theme-switcher/gnome-theme-installer.c 1 Nov 2005 21:49:29 -0000
@@ -191,7 +191,6 @@ transfer_done_tarbz2_idle_cb (gpointer d
static void
transfer_done_cb (GtkWidget *dlg, gchar *path)
{
- GtkWidget *dialog;
int len = strlen (path);
gchar *command,**dir, *first_line, *filename;
int status,theme_type;
@@ -220,6 +219,8 @@ transfer_done_cb (GtkWidget *dlg, gchar
theme_props->filetype=TARBZ;
g_free (filename);
} else {
+ GtkWidget *dialog;
+
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
@@ -600,15 +601,15 @@ gnome_theme_installer_run (GtkWidget *pa
running_theme_install = TRUE;
if (!g_file_test ("/bin/tar", G_FILE_TEST_EXISTS)) {
- GtkWidget *dialog;
+ GtkWidget *error_dialog;
- dialog = gtk_message_dialog_new (NULL,
+ error_dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
_("Cannot install theme.\nThe tar program is not installed on your system."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_dialog_run (GTK_DIALOG (error_dialog));
+ gtk_widget_destroy (error_dialog);
return;
}
Index: capplets/theme-switcher/gnome-theme-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/theme-switcher/gnome-theme-manager.c,v
retrieving revision 1.54
diff -u -p -r1.54 gnome-theme-manager.c
--- capplets/theme-switcher/gnome-theme-manager.c 11 Oct 2005 11:27:36 -0000 1.54
+++ capplets/theme-switcher/gnome-theme-manager.c 1 Nov 2005 21:49:29 -0000
@@ -745,7 +745,7 @@ remove_custom_row_from_meta_theme (void)
custom_meta_theme_info.name = NULL;
}
-gboolean
+static gboolean
themes_equal (GnomeThemeMetaInfo *a, GnomeThemeMetaInfo *b)
{
if (!a->gtk_theme_name ||
Index: capplets/windows/gnome-window-properties.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/capplets/windows/gnome-window-properties.c,v
retrieving revision 1.20
diff -u -p -r1.20 gnome-window-properties.c
--- capplets/windows/gnome-window-properties.c 22 May 2005 15:46:43 -0000 1.20
+++ capplets/windows/gnome-window-properties.c 1 Nov 2005 21:49:29 -0000
@@ -49,7 +49,6 @@ static GtkWidget *autoraise_checkbutton;
static GtkWidget *autoraise_delay_slider;
static GtkWidget *autoraise_delay_hbox;
static GtkWidget *double_click_titlebar_optionmenu;
-static GtkWidget *double_click_titlebar_hbox;
static GtkWidget *alt_click_hbox;
static GnomeWMSettings *settings;
@@ -453,7 +452,6 @@ main (int argc, char **argv)
autoraise_delay_slider = WID ("autoraise-delay-slider");
autoraise_delay_hbox = WID ("autoraise-delay-hbox");
double_click_titlebar_optionmenu = WID ("double-click-titlebar-optionmenu");
- double_click_titlebar_hbox = WID ("double-click-titlebar-hbox");
alt_click_hbox = WID ("alt-click-box");
gtk_range_set_range (GTK_RANGE (autoraise_delay_slider),
Index: control-center/control-center-categories.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/control-center/control-center-categories.c,v
retrieving revision 1.10
diff -u -p -r1.10 control-center-categories.c
--- control-center/control-center-categories.c 15 Oct 2005 21:42:13 -0000 1.10
+++ control-center/control-center-categories.c 1 Nov 2005 21:49:29 -0000
@@ -178,7 +178,6 @@ populate_category (ControlCenterCategory
g_slist_free (items);
if (entries != NULL) {
- GSList *l;
int i;
category->n_entries = g_slist_length (entries);
Index: control-center/control-center.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/control-center/control-center.c,v
retrieving revision 1.11
diff -u -p -r1.11 control-center.c
--- control-center/control-center.c 18 Oct 2005 22:51:31 -0000 1.11
+++ control-center/control-center.c 1 Nov 2005 21:49:29 -0000
@@ -71,13 +71,11 @@ create_window (void)
int
main (int argc, char *argv[])
{
- GnomeProgram *ccprogram;
-
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- ccprogram = gnome_program_init ("gnome-control-center",
+ gnome_program_init ("gnome-control-center",
VERSION, LIBGNOMEUI_MODULE,
argc, argv,
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
Index: control-center/gnomecc-canvas.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/control-center/gnomecc-canvas.c,v
retrieving revision 1.3
diff -u -p -r1.3 gnomecc-canvas.c
--- control-center/gnomecc-canvas.c 24 Oct 2005 11:31:27 -0000 1.3
+++ control-center/gnomecc-canvas.c 1 Nov 2005 21:49:29 -0000
@@ -228,7 +228,6 @@ gnome_canvas_item_show_hide (GnomeCanvas
static void
setup_entry (GnomeccCanvas *canvas, ControlCenterEntry *entry)
{
- GnomeccCanvasPrivate *priv;
EntryInfo *ei;
GtkWidget *widget;
GtkStateType state;
@@ -236,7 +235,6 @@ setup_entry (GnomeccCanvas *canvas, Cont
if (!entry)
return;
- priv = GNOMECC_CANVAS_GET_PRIVATE (canvas);
widget = GTK_WIDGET (canvas);
ei = entry->user_data;
@@ -365,7 +363,6 @@ cb_canvas_event (GnomeCanvasItem *item,
GnomeccCanvasPrivate *priv;
EntryInfo *ei = NULL;
gint n_category, n_entry;
- gint n_categories, n_entries;
priv = GNOMECC_CANVAS_GET_PRIVATE (canvas);
@@ -382,8 +379,6 @@ cb_canvas_event (GnomeCanvasItem *item,
n_entry = 0;
n_category = 0;
- n_categories = priv->info->n_categories;
- n_entries = priv->info->categories[ei->n_category]->n_entries;
switch (event->key.keyval) {
case GDK_KP_Right:
@@ -446,7 +441,6 @@ cb_canvas_event (GnomeCanvasItem *item,
activate_entry (priv->selected);
return TRUE;
- break;
case GDK_Escape:
gtk_main_quit ();
return TRUE;
@@ -1225,12 +1219,8 @@ gnomecc_canvas_item_accessible_ref_state
static void
gnomecc_canvas_item_accessible_class_init (AtkObjectClass *class)
{
- GObjectClass *object_class;
-
accessible_item_parent_class = g_type_class_peek_parent (class);
- object_class = (GObjectClass *)class;
-
class->get_index_in_parent = gnomecc_canvas_item_accessible_get_index_in_parent;
class->get_name = gnomecc_canvas_item_accessible_get_name;
class->get_parent = gnomecc_canvas_item_accessible_get_parent;
@@ -1387,14 +1377,8 @@ gnomecc_canvas_accessible_initialize (At
static void
gnomecc_canvas_accessible_class_init (AtkObjectClass *class)
{
- GObjectClass *object_class;
- GtkAccessibleClass *accessible_class;
-
accessible_parent_class = g_type_class_peek_parent (class);
- object_class = (GObjectClass *)class;
- accessible_class = (GtkAccessibleClass *)class;
-
class->get_n_children = gnomecc_canvas_accessible_get_n_children;
class->ref_child = gnomecc_canvas_accessible_ref_child;
class->initialize = gnomecc_canvas_accessible_initialize;
@@ -1403,7 +1387,6 @@ gnomecc_canvas_accessible_class_init (At
static gboolean
gnomecc_canvas_accessible_add_selection (AtkSelection *selection, gint i)
{
- GnomeccCanvasPrivate *priv;
GnomeccCanvas *canvas;
GtkWidget *widget;
ControlCenterEntry *entry;
@@ -1414,7 +1397,6 @@ gnomecc_canvas_accessible_add_selection
return FALSE;
canvas = GNOMECC_CANVAS (widget);
- priv = GNOMECC_CANVAS_GET_PRIVATE (canvas);
entry = gnomecc_canvas_accessible_get_entry (canvas, i);
select_entry (canvas, entry);
Index: control-center/gnomecc-rounded-rect.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/control-center/gnomecc-rounded-rect.c,v
retrieving revision 1.1
diff -u -p -r1.1 gnomecc-rounded-rect.c
--- control-center/gnomecc-rounded-rect.c 30 May 2004 21:24:09 -0000 1.1
+++ control-center/gnomecc-rounded-rect.c 1 Nov 2005 21:49:30 -0000
@@ -33,7 +33,7 @@ typedef GnomeCanvasRectClass GnomeccRoun
#define GNOMECC_ROUNDED_RECT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNOMECC_TYPE_ROUNDED_RECT, GnomeccRoundedRectClass))
#define GNOMECC_IS_ROUNDED_RECT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOMECC_TYPE_ROUNDED_RECT))
-G_DEFINE_TYPE (GnomeccRoundedRect, gnomecc_rounded_rect, GNOME_TYPE_CANVAS_RECT);
+G_DEFINE_TYPE (GnomeccRoundedRect, gnomecc_rounded_rect, GNOME_TYPE_CANVAS_RECT)
/*************************************************************************
* Adapted from nautilus/libnautilus-private/nautilus-icon-canvas-item.c
Index: gnome-settings-daemon/clipboard-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/clipboard-manager.c,v
retrieving revision 1.1
diff -u -p -r1.1 clipboard-manager.c
--- gnome-settings-daemon/clipboard-manager.c 3 Jun 2005 08:29:45 -0000 1.1
+++ gnome-settings-daemon/clipboard-manager.c 1 Nov 2005 21:49:30 -0000
@@ -165,13 +165,10 @@ clipboard_bytes_per_item (int format)
{
case 8:
return sizeof (char);
- break;
case 16:
return sizeof (short);
- break;
case 32:
return sizeof (long);
- break;
default: ;
}
return 0;
@@ -703,7 +700,6 @@ clipboard_manager_process_event (Clipboa
return receive_incrementally (manager, xev);
else
return send_incrementally (manager, xev);
- break;
case SelectionClear:
if (xev->xany.window != manager->window)
Index: gnome-settings-daemon/gnome-settings-daemon.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-daemon.c,v
retrieving revision 1.39
diff -u -p -r1.39 gnome-settings-daemon.c
--- gnome-settings-daemon/gnome-settings-daemon.c 17 Oct 2005 14:53:19 -0000 1.39
+++ gnome-settings-daemon/gnome-settings-daemon.c 1 Nov 2005 21:49:30 -0000
@@ -214,7 +214,7 @@ manager_event_filter (GdkXEvent *xevent,
return GDK_FILTER_CONTINUE;
}
-CORBA_boolean
+static CORBA_boolean
awake_impl (PortableServer_Servant servant,
const CORBA_char *service,
CORBA_Environment *ev)
@@ -420,7 +420,7 @@ gnome_settings_daemon_new (void)
* Helper function for spawn_with_input() - wait for a child
* to exit.
*/
-gboolean
+static gboolean
wait_for_child (int pid,
int *status)
{
@@ -500,7 +500,6 @@ void
gnome_settings_daemon_spawn_with_input (char **argv,
const char *input)
{
- int exit_status;
int child_pid;
int inpipe;
GError *err = NULL;
@@ -513,7 +512,7 @@ gnome_settings_daemon_spawn_with_input (
&inpipe, NULL, NULL, /* stdin, stdout, stderr */
&err))
{
- gchar *command = g_strjoinv (" ", argv);
+ command = g_strjoinv (" ", argv);
g_warning ("Could not execute %s: %s", command, err->message);
g_error_free (err);
g_free (command);
Index: gnome-settings-daemon/gnome-settings-default-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-default-editor.c,v
retrieving revision 1.7
diff -u -p -r1.7 gnome-settings-default-editor.c
--- gnome-settings-daemon/gnome-settings-default-editor.c 25 Dec 2004 14:32:12 -0000 1.7
+++ gnome-settings-daemon/gnome-settings-default-editor.c 1 Nov 2005 21:49:30 -0000
@@ -32,7 +32,7 @@
static gboolean sync_changes;
-#if DE_DEBUG
+#ifdef DE_DEBUG
static void
print_mime_app (const char *mime_type)
{
@@ -106,7 +106,7 @@ vfs_change_cb (GnomeVFSMIMEMonitor *moni
return;
}
-#if DE_DEBUG
+#ifdef DE_DEBUG
g_message ("Synching text/plain to text/*...");
#endif
Index: gnome-settings-daemon/gnome-settings-keybindings.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keybindings.c,v
retrieving revision 1.11
diff -u -p -r1.11 gnome-settings-keybindings.c
--- gnome-settings-daemon/gnome-settings-keybindings.c 17 Oct 2005 14:53:19 -0000 1.11
+++ gnome-settings-daemon/gnome-settings-keybindings.c 1 Nov 2005 21:49:30 -0000
@@ -104,7 +104,7 @@ screen_exec_display_string (GdkScreen *s
* mainly ripped from egg_screen_exec_display_string in
* gnome-panel/egg-screen-exec.c
**/
-char **
+static char **
get_exec_environment (XEvent *xevent)
{
char **retval = NULL;
@@ -169,7 +169,7 @@ parse_binding (Binding *binding)
return TRUE;
}
-gboolean
+static gboolean
bindings_get_entry (char *subdir)
{
GConfValue *value;
@@ -289,7 +289,7 @@ grab_key (GdkWindow *root, Key *key, int
gdk_flush ();
if (gdk_error_trap_pop ()) {
g_warning (_("It seems that another application already has"
- " access to key '%d'."), key->keycode);
+ " access to key '%u'."), key->keycode);
}
}
@@ -330,7 +330,7 @@ do_grab (gboolean grab,
}
}
-void
+static void
binding_register_keys (void)
{
GSList *li;
@@ -380,7 +380,7 @@ bindings_callback (GConfEntry *entry)
binding_register_keys ();
}
-GdkFilterReturn
+static GdkFilterReturn
keybindings_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
gpointer data)
Index: gnome-settings-daemon/gnome-settings-typing-break.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-typing-break.c,v
retrieving revision 1.3
diff -u -p -r1.3 gnome-settings-typing-break.c
--- gnome-settings-daemon/gnome-settings-typing-break.c 15 Oct 2005 21:56:43 -0000 1.3
+++ gnome-settings-daemon/gnome-settings-typing-break.c 1 Nov 2005 21:49:30 -0000
@@ -6,8 +6,8 @@
#include "reaper.h"
#include <string.h>
-pid_t typing_monitor_pid = 0;
-guint typing_monitor_idle_id = 0;
+static pid_t typing_monitor_pid = 0;
+static guint typing_monitor_idle_id = 0;
static gboolean
typing_break_timeout (gpointer data)
Index: gnome-settings-daemon/gnome-settings-xrdb.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xrdb.c,v
retrieving revision 1.6
diff -u -p -r1.6 gnome-settings-xrdb.c
--- gnome-settings-daemon/gnome-settings-xrdb.c 15 Oct 2005 21:56:43 -0000 1.6
+++ gnome-settings-daemon/gnome-settings-xrdb.c 1 Nov 2005 21:49:30 -0000
@@ -40,7 +40,7 @@
#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
-GtkWidget *widget;
+static GtkWidget *widget;
/*
* Theme colour functions
@@ -171,8 +171,6 @@ scan_ad_directory (const char *path, GEr
return NULL;
}
while ((entry = g_dir_read_name (dir)) != NULL) {
- int len;
- len = strlen (entry);
if (g_str_has_suffix (entry, ".ad")) {
list = g_slist_prepend (list, g_strdup_printf ("%s/%s", path, entry));
}
Index: gnome-settings-daemon/gnome-settings-xsettings.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xsettings.c,v
retrieving revision 1.32
diff -u -p -r1.32 gnome-settings-xsettings.c
--- gnome-settings-daemon/gnome-settings-xsettings.c 18 Oct 2005 14:25:26 -0000 1.32
+++ gnome-settings-daemon/gnome-settings-xsettings.c 1 Nov 2005 21:49:30 -0000
@@ -164,32 +164,23 @@ type_to_string (GConfValueType type)
{
case GCONF_VALUE_INT:
return "int";
- break;
case GCONF_VALUE_STRING:
return "string";
- break;
case GCONF_VALUE_FLOAT:
return "float";
- break;
case GCONF_VALUE_BOOL:
return "bool";
- break;
case GCONF_VALUE_SCHEMA:
return "schema";
- break;
case GCONF_VALUE_LIST:
return "list";
- break;
case GCONF_VALUE_PAIR:
return "pair";
- break;
case GCONF_VALUE_INVALID:
return "*invalid*";
- break;
default:
g_assert_not_reached();
return NULL; /* for warnings */
- break;
}
}
Index: gnome-settings-daemon/xsettings-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/xsettings-manager.c,v
retrieving revision 1.1
diff -u -p -r1.1 xsettings-manager.c
--- gnome-settings-daemon/xsettings-manager.c 9 Dec 2001 18:50:28 -0000 1.1
+++ gnome-settings-daemon/xsettings-manager.c 1 Nov 2005 21:49:30 -0000
@@ -45,7 +45,7 @@ struct _XSettingsManager
unsigned long serial;
};
-XSettingsList *settings;
+static XSettingsList *settings;
typedef struct
{
@@ -295,7 +295,7 @@ xsettings_manager_set_color (XSettingsMa
return xsettings_manager_set_setting (manager, &setting);
}
-size_t
+static size_t
setting_length (XSettingsSetting *setting)
{
size_t length = 8; /* type + pad + name-len + last-change-serial */
@@ -317,7 +317,7 @@ setting_length (XSettingsSetting *settin
return length;
}
-void
+static void
setting_store (XSettingsSetting *setting,
XSettingsBuffer *buffer)
{
Index: gnome-settings-daemon/actions/acme-volume-dummy.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/actions/acme-volume-dummy.c,v
retrieving revision 1.1
diff -u -p -r1.1 acme-volume-dummy.c
--- gnome-settings-daemon/actions/acme-volume-dummy.c 13 Jan 2004 15:57:36 -0000 1.1
+++ gnome-settings-daemon/actions/acme-volume-dummy.c 1 Nov 2005 21:49:30 -0000
@@ -31,12 +31,8 @@ static void acme_volume_dummy_set_volume
static void
acme_volume_dummy_finalize (GObject *object)
{
- AcmeVolumeDummy *self;
-
g_return_if_fail (object != NULL);
g_return_if_fail (ACME_IS_VOLUME_DUMMY (object));
-
- self = ACME_VOLUME_DUMMY (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
Index: gnome-settings-daemon/actions/acme-volume.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/actions/acme-volume.c,v
retrieving revision 1.4
diff -u -p -r1.4 acme-volume.c
--- gnome-settings-daemon/actions/acme-volume.c 18 Jun 2004 09:35:21 -0000 1.4
+++ gnome-settings-daemon/actions/acme-volume.c 1 Nov 2005 21:49:30 -0000
@@ -41,7 +41,7 @@ static void
acme_volume_class_init (AcmeVolumeClass *klass)
{
parent_class = g_type_class_peek_parent (klass);
-};
+}
static void
acme_volume_init (AcmeVolume *vol)
@@ -115,6 +115,5 @@ AcmeVolume *acme_volume_new (void)
vol = ACME_VOLUME (g_object_new (acme_volume_oss_get_type (), NULL));
return vol;
#endif
- return ACME_VOLUME (g_object_new (acme_volume_dummy_get_type (), NULL));
}
Index: libgswitchit/gswitchit_config.c
===================================================================
RCS file: /cvs/gnome/libgswitchit/gswitchit_config.c,v
retrieving revision 1.36
diff -u -p -r1.36 gswitchit_config.c
--- libgswitchit/gswitchit_config.c 26 Jul 2005 20:38:25 -0000 1.36
+++ libgswitchit/gswitchit_config.c 1 Nov 2005 21:49:30 -0000
@@ -656,7 +656,7 @@ GSwitchItConfigLockNextGroup (void)
}
void
-GSwitchIttConfigLockPrevGroup (void)
+GSwitchItConfigLockPrevGroup (void)
{
int group = XklGetPrevGroup ();
XklLockGroup (group);
Index: libkbdraw/keyboard-drawing.h
===================================================================
RCS file: /cvs/gnome/kbdraw/src/keyboard-drawing.h,v
retrieving revision 1.17
diff -u -p -r1.17 keyboard-drawing.h
--- libkbdraw/keyboard-drawing.h 31 Dec 2004 00:26:58 -0000 1.17
+++ libkbdraw/keyboard-drawing.h 1 Nov 2005 21:49:30 -0000
@@ -168,8 +168,8 @@ struct _KeyboardDrawingClass
guint keycode);
};
-GType keyboard_drawing_get_type ();
-GtkWidget * keyboard_drawing_new ();
+GType keyboard_drawing_get_type (void);
+GtkWidget * keyboard_drawing_new (void);
GdkPixbuf * keyboard_drawing_get_pixbuf (KeyboardDrawing *kbdrawing);
gboolean keyboard_drawing_set_keyboard (KeyboardDrawing *kbdrawing,
Index: libsounds/sound-view.c
===================================================================
RCS file: /cvs/gnome/libsounds/libsounds/sound-view.c,v
retrieving revision 1.26
diff -u -p -r1.26 sound-view.c
--- libsounds/sound-view.c 28 Oct 2004 19:26:03 -0000 1.26
+++ libsounds/sound-view.c 1 Nov 2005 21:49:30 -0000
@@ -7,7 +7,7 @@
static GtkVBoxClass *sound_view_parent_class;
-enum {
+static enum {
CATEGORY,
EVENT
} SoundViewRowType;
Index: libwindow-settings/gnome-window-manager.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/libwindow-settings/gnome-window-manager.c,v
retrieving revision 1.10
diff -u -p -r1.10 gnome-window-manager.c
--- libwindow-settings/gnome-window-manager.c 22 Jun 2004 01:50:50 -0000 1.10
+++ libwindow-settings/gnome-window-manager.c 1 Nov 2005 21:49:30 -0000
@@ -181,10 +181,8 @@ static void
gnome_window_manager_class_init (GnomeWindowManagerClass *class)
{
GObjectClass *object_class;
- GnomeWindowManagerClass *wm_class;
object_class = G_OBJECT_CLASS (class);
- wm_class = GNOME_WINDOW_MANAGER_CLASS (class);
object_class->finalize = gnome_window_manager_finalize;
Index: typing-break/drw-selection.h
===================================================================
RCS file: /cvs/gnome/gnome-control-center/typing-break/drw-selection.h,v
retrieving revision 1.1
diff -u -p -r1.1 drw-selection.h
--- typing-break/drw-selection.h 26 Jun 2003 11:40:10 -0000 1.1
+++ typing-break/drw-selection.h 1 Nov 2005 21:49:30 -0000
@@ -26,7 +26,7 @@
typedef struct _DrwSelection DrwSelection;
-DrwSelection * drw_selection_start ();
+DrwSelection * drw_selection_start (void);
void drw_selection_stop (DrwSelection *drw_selection);
gboolean drw_selection_is_master (DrwSelection *drw_selection);
Index: vfs-methods/fontilus/font-method.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/fontilus/font-method.c,v
retrieving revision 1.10
diff -u -p -r1.10 font-method.c
--- vfs-methods/fontilus/font-method.c 12 May 2005 05:04:42 -0000 1.10
+++ vfs-methods/fontilus/font-method.c 1 Nov 2005 21:49:30 -0000
@@ -100,7 +100,7 @@ get_pango_name(FcPattern *pat)
* if not, remove the comma. */
if (str->str[str->len-1] == ',') {
const gchar *lastword;
- gint wordlen, i;
+ gint wordlen;
gboolean word_matches;
const char *modifier_words[] = {
"Oblique", "Italic", "Small-Caps", "Ultra-Light", "Light",
@@ -414,8 +414,6 @@ do_open(GnomeVFSMethod *method,
/* handle the .directory file */
if (!strcmp(path, "/.directory")) {
- GnomeVFSURI *uri;
-
uri = gnome_vfs_uri_new(FONT_METHOD_DIRECTORY);
result = gnome_vfs_open_uri_cancellable(
(GnomeVFSHandle **)method_handle, uri, mode, context);
Index: vfs-methods/fontilus/ftstream-vfs.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/fontilus/ftstream-vfs.c,v
retrieving revision 1.11
diff -u -p -r1.11 ftstream-vfs.c
--- vfs-methods/fontilus/ftstream-vfs.c 25 Dec 2004 14:37:33 -0000 1.11
+++ vfs-methods/fontilus/ftstream-vfs.c 1 Nov 2005 21:49:30 -0000
@@ -26,7 +26,7 @@
#include FT_FREETYPE_H
#include <libgnomevfs/gnome-vfs.h>
-static unsigned long
+static guint64
vfs_stream_read(FT_Stream stream,
unsigned long offset,
unsigned char *buffer,
Index: vfs-methods/fontilus/thumbnailer.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/fontilus/thumbnailer.c,v
retrieving revision 1.11
diff -u -p -r1.11 thumbnailer.c
--- vfs-methods/fontilus/thumbnailer.c 2 Feb 2005 11:13:54 -0000 1.11
+++ vfs-methods/fontilus/thumbnailer.c 1 Nov 2005 21:49:30 -0000
@@ -29,7 +29,7 @@
#include <libgnomevfs/gnome-vfs.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-const gchar *
+static const gchar *
get_ft_error(FT_Error error)
{
#undef __FTERRORS_H__
Index: vfs-methods/themus/theme-method.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/vfs-methods/themus/theme-method.c,v
retrieving revision 1.7
diff -u -p -r1.7 theme-method.c
--- vfs-methods/themus/theme-method.c 25 Dec 2004 14:37:57 -0000 1.7
+++ vfs-methods/themus/theme-method.c 1 Nov 2005 21:49:30 -0000
@@ -337,8 +337,6 @@ do_open(GnomeVFSMethod *method,
/* handle the .directory file */
if (!strcmp(path, "/.directory")) {
- GnomeVFSURI *uri;
-
uri = gnome_vfs_uri_new(THEME_METHOD_DIRECTORY);
result = gnome_vfs_open_uri_cancellable(
(GnomeVFSHandle **)method_handle, uri, mode, context);
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]