[accounts-dialog] Fix all the compile-time warnings
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Fix all the compile-time warnings
- Date: Wed, 13 Jan 2010 11:56:11 +0000 (UTC)
commit ef6aaf2e40ac7baa5d93381d6ecf22f5dd879c0f
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 13 11:11:47 2010 +0000
Fix all the compile-time warnings
Unused variables, public functions that should be static and
missing declarations.
src/main.c | 4 ++--
src/um-account-type-dialog.c | 1 -
src/um-email-dialog.c | 1 -
src/um-language-dialog.c | 6 ------
src/um-names-dialog.c | 1 -
src/um-password-dialog.c | 5 -----
src/um-photo-dialog.c | 6 +-----
src/um-user.c | 5 +----
8 files changed, 4 insertions(+), 25 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index cb5be15..8643165 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,6 +23,8 @@
#include <string.h>
#include <locale.h>
#include <libintl.h>
+#include <unistd.h>
+#include <sys/types.h>
#include <glib.h>
#include <glib/gi18n.h>
@@ -208,7 +210,6 @@ static void
user_changed (UmUserManager *um, UmUser *user, UserAccountDialog *d)
{
GtkTreeView *tv;
- GtkListStore *store;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -726,7 +727,6 @@ main (int argc, char *argv[])
UserAccountDialog *d;
UniqueApp *app;
GError *error;
- GSList *users;
const gchar *filename;
GtkWidget *dialog;
GOptionContext *context;
diff --git a/src/um-account-type-dialog.c b/src/um-account-type-dialog.c
index afe339b..a55fcf4 100644
--- a/src/um-account-type-dialog.c
+++ b/src/um-account-type-dialog.c
@@ -129,7 +129,6 @@ void
um_account_type_dialog_set_user (UmAccountTypeDialog *um,
UmUser *user)
{
- GtkWidget *widget;
GdkPixbuf *pixbuf;
const gchar *name;
UmAccountType account_type;
diff --git a/src/um-email-dialog.c b/src/um-email-dialog.c
index 9f8cb82..c67e3b1 100644
--- a/src/um-email-dialog.c
+++ b/src/um-email-dialog.c
@@ -117,7 +117,6 @@ void
um_email_dialog_set_user (UmEmailDialog *um,
UmUser *user)
{
- GtkWidget *widget;
GdkPixbuf *pixbuf;
const gchar *name;
const gchar *email;
diff --git a/src/um-language-dialog.c b/src/um-language-dialog.c
index 64e2b9f..a20775d 100644
--- a/src/um-language-dialog.c
+++ b/src/um-language-dialog.c
@@ -59,10 +59,6 @@ static void
accept_language_dialog (GtkButton *button,
UmLanguageDialog *um)
{
- GtkWidget *widget;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
um_user_set_language (um->user, um->language);
gtk_widget_hide (um->dialog);
@@ -386,7 +382,6 @@ static void
language_combo_changed (GtkComboBox *combo,
UmLanguageDialog *um)
{
- GtkTreeModel *model;
GtkTreeIter iter;
char *lang;
@@ -487,7 +482,6 @@ void
um_language_dialog_set_user (UmLanguageDialog *um,
UmUser *user)
{
- GtkWidget *widget;
GdkPixbuf *pixbuf;
const gchar *name;
diff --git a/src/um-names-dialog.c b/src/um-names-dialog.c
index e1eea03..4ff00e1 100644
--- a/src/um-names-dialog.c
+++ b/src/um-names-dialog.c
@@ -191,7 +191,6 @@ void
um_names_dialog_set_user (UmNamesDialog *um,
UmUser *user)
{
- GtkWidget *widget;
GdkPixbuf *pixbuf;
const gchar *name;
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index e06de4b..46f711d 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -234,7 +234,6 @@ accept_password_dialog (GtkButton *button,
gint active;
const gchar *hint;
const gchar *password;
- UmUserManager *manager;
model = gtk_combo_box_get_model (GTK_COMBO_BOX (um->action_combo));
gtk_combo_box_get_active_iter (GTK_COMBO_BOX (um->action_combo), &iter);
@@ -295,7 +294,6 @@ action_changed (GtkComboBox *combo,
UmPasswordDialog *um)
{
gint active;
- GtkWidget *widget;
active = gtk_combo_box_get_active (combo);
gtk_notebook_set_current_page (GTK_NOTEBOOK (um->notebook), active);
@@ -306,7 +304,6 @@ static void
show_password_toggled (GtkToggleButton *button,
UmPasswordDialog *um)
{
- GtkWidget *widget;
gboolean active;
active = gtk_toggle_button_get_active (button);
@@ -504,9 +501,7 @@ void
um_password_dialog_set_user (UmPasswordDialog *um,
UmUser *user)
{
- GtkWidget *widget;
GdkPixbuf *pixbuf;
- const gchar *name;
if (um->user) {
g_object_unref (um->user);
diff --git a/src/um-photo-dialog.c b/src/um-photo-dialog.c
index a206767..906a588 100644
--- a/src/um-photo-dialog.c
+++ b/src/um-photo-dialog.c
@@ -119,7 +119,6 @@ file_chooser_response (GtkDialog *chooser,
gchar *filename;
GError *error;
GdkPixbuf *pixbuf;
- GtkAllocation allocation;
if (response == GTK_RESPONSE_ACCEPT) {
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
@@ -257,15 +256,13 @@ load_faces (UmPhotoDialog *um)
gchar *filename;
GFile *file;
GIcon *icon;
- GdkPixbuf *pixbuf;
GtkListStore *store;
GtkTreeIter iter;
- GtkWidget *widget;
/* TODO load incrementally, add recent images, add user faces */
store = gtk_list_store_new (4, G_TYPE_ICON, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
dir = g_dir_open (DATADIR "/pixmaps/faces", 0, NULL);
- while (face = g_dir_read_name (dir)) {
+ while ((face = g_dir_read_name (dir)) != NULL) {
filename = g_build_filename (DATADIR "/pixmaps/faces", face, NULL);
file = g_file_new_for_path (filename);
icon = g_file_icon_new (file);
@@ -290,7 +287,6 @@ gallery_selection_changed (GtkIconView *gallery,
GtkTreePath *path;
GtkTreeIter iter;
gboolean can_select;
- GtkWidget *widget;
model = GTK_TREE_MODEL (um->gallery_store);
list = gtk_icon_view_get_selected_items (gallery);
diff --git a/src/um-user.c b/src/um-user.c
index 6a39670..db55b22 100644
--- a/src/um-user.c
+++ b/src/um-user.c
@@ -364,9 +364,7 @@ render_icon_from_cache (UmUser *user,
{
GdkPixbuf *retval;
char *path;
- gboolean is_autofs;
gboolean res;
- char *filesystem_type;
path = g_build_filename (UM_CACHE_DIR, user->props->user_name, "face", NULL);
res = check_user_file (path,
@@ -624,7 +622,6 @@ um_user_render_icon (UmUser *user,
GdkPixbuf *pixbuf;
GdkPixbuf *framed;
char *path;
- char *tmp;
gboolean res;
GError *error;
@@ -973,7 +970,7 @@ salt_char (GRand *rand)
return salt[g_rand_int_range (rand, 0, G_N_ELEMENTS (salt))];
}
-gchar *
+static gchar *
make_crypted (const gchar *plain)
{
GString *salt;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]