[seahorse] Fix more compiler warnings.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seahorse] Fix more compiler warnings.
- Date: Sat, 29 Aug 2009 17:59:02 +0000 (UTC)
commit 844ccf8a6bc05fb2064f98d7a2fd20bc64853c38
Author: Stef Walter <stef memberwebs com>
Date: Sat Aug 29 17:58:24 2009 +0000
Fix more compiler warnings.
pgp/seahorse-gpgme-key-op.c | 6 +++---
pgp/seahorse-ldap-source.c | 2 ++
src/seahorse-key-manager-store.c | 2 +-
src/seahorse-viewer.c | 10 ++--------
ssh/seahorse-ssh-operation.c | 2 +-
5 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/pgp/seahorse-gpgme-key-op.c b/pgp/seahorse-gpgme-key-op.c
index 11ef648..c059494 100644
--- a/pgp/seahorse-gpgme-key-op.c
+++ b/pgp/seahorse-gpgme-key-op.c
@@ -716,7 +716,7 @@ typedef enum
static gpgme_error_t
edit_trust_action (guint state, gpointer data, int fd)
{
- gint trust = (gint)data;
+ gint trust = GPOINTER_TO_INT (data);
switch (state) {
/* enter command */
@@ -863,7 +863,7 @@ seahorse_gpgme_key_op_set_trust (SeahorseGpgmeKey *pkey, SeahorseValidity trust)
}
parms = seahorse_edit_parm_new (TRUST_START, edit_trust_action,
- edit_trust_transit, (gpointer)menu_choice);
+ edit_trust_transit, GINT_TO_POINTER (menu_choice));
return edit_key (pkey, parms);
}
@@ -1541,7 +1541,7 @@ del_key_action (guint state, gpointer data, int fd)
switch (state) {
/* select key */
case DEL_KEY_SELECT:
- PRINTF ((fd, "key %d", (guint)data));
+ PRINTF ((fd, "key %d", GPOINTER_TO_UINT (data)));
break;
case DEL_KEY_COMMAND:
PRINT ((fd, "delkey"));
diff --git a/pgp/seahorse-ldap-source.c b/pgp/seahorse-ldap-source.c
index bd467d4..9662c47 100644
--- a/pgp/seahorse-ldap-source.c
+++ b/pgp/seahorse-ldap-source.c
@@ -958,6 +958,7 @@ start_search_operation (SeahorseLDAPSource *lsrc, const gchar *pattern)
return lop;
}
+#if 0 /* UNUSED */
/* Initiate a search operation by fingerprint */
static SeahorseLDAPOperation *
start_search_operation_fpr (SeahorseLDAPSource *lsrc, const gchar *fpr)
@@ -984,6 +985,7 @@ start_search_operation_fpr (SeahorseLDAPSource *lsrc, const gchar *fpr)
return lop;
}
+#endif /* UNUSED */
/* -----------------------------------------------------------------------------
* GET OPERATION
diff --git a/src/seahorse-key-manager-store.c b/src/seahorse-key-manager-store.c
index 6f0190d..ac468c5 100644
--- a/src/seahorse-key-manager-store.c
+++ b/src/seahorse-key-manager-store.c
@@ -254,7 +254,7 @@ filter_callback (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
static gboolean
refilter_now (SeahorseKeyManagerStore* skstore)
{
- g_return_if_fail (skstore->priv->filter);
+ g_return_val_if_fail (skstore->priv->filter, FALSE);
seahorse_set_refresh (SEAHORSE_SET_MODEL (skstore)->set);
gtk_tree_model_filter_refilter (skstore->priv->filter);
skstore->priv->filter_stag = 0;
diff --git a/src/seahorse-viewer.c b/src/seahorse-viewer.c
index 0494dd2..e3e27a9 100644
--- a/src/seahorse-viewer.c
+++ b/src/seahorse-viewer.c
@@ -443,7 +443,6 @@ on_key_delete (GtkAction* action, SeahorseViewer* self)
GList *objects = NULL;
GList *all_objects = NULL;
GList *l;
- guint num;
g_return_if_fail (SEAHORSE_IS_VIEWER (self));
g_return_if_fail (GTK_IS_ACTION (action));
@@ -457,13 +456,8 @@ on_key_delete (GtkAction* action, SeahorseViewer* self)
SeahorseObject* object = l->data;
if (seahorse_object_get_usage (object) == SEAHORSE_USAGE_PRIVATE_KEY) {
- gchar* prompt = NULL;
- if (num == 1)
- prompt = g_strdup_printf (_("%s is a private key. Are you sure you want to proceed?"),
- seahorse_object_get_label (object));
- else
- prompt = g_strdup (_("One or more of the deleted keys are private keys. Are you sure you want to proceed?"));
-
+ gchar* prompt = g_strdup_printf (_("%s is a private key. Are you sure you want to proceed?"),
+ seahorse_object_get_label (object));
if (!seahorse_util_prompt_delete (prompt, GTK_WIDGET (seahorse_view_get_window (SEAHORSE_VIEW (self))))) {
g_free (prompt);
g_list_free (objects);
diff --git a/ssh/seahorse-ssh-operation.c b/ssh/seahorse-ssh-operation.c
index aca8ec5..b89b2a2 100644
--- a/ssh/seahorse-ssh-operation.c
+++ b/ssh/seahorse-ssh-operation.c
@@ -201,7 +201,7 @@ io_ssh_write (GIOChannel *source, GIOCondition condition, SeahorseSSHOperation *
case G_IO_STATUS_AGAIN:
break;
default:
- DEBUG_OPERATION (("SSHOP: Wrote %d bytes to SSH\n", written));
+ DEBUG_OPERATION (("SSHOP: Wrote %d bytes to SSH\n", (gint)written));
g_string_erase (pv->sin, 0, written);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]