[gnome-keyring] Fix compile warnings when building with --disable-debug



commit f591c2326710dbc685a39eb6056eb7734219f181
Author: Stef Walter <stefw collabora co uk>
Date:   Tue Aug 30 13:36:15 2011 +0200

    Fix compile warnings when building with --disable-debug

 daemon/dbus/gkd-secret-property.c           |    8 ++++----
 daemon/ssh-agent/gkd-ssh-agent-ops.c        |    2 +-
 egg/egg-asn1x.c                             |    4 +---
 egg/egg-secure-memory.c                     |    4 ++++
 gcr/gcr-certificate-renderer.c              |    2 +-
 gcr/gcr-parser.c                            |    2 +-
 pkcs11/gnome2-store/gkm-gnome2-storage.c    |    2 +-
 pkcs11/secret-store/gkm-secret-collection.c |    2 +-
 8 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-property.c b/daemon/dbus/gkd-secret-property.c
index cd2104e..35c7d38 100644
--- a/daemon/dbus/gkd-secret-property.c
+++ b/daemon/dbus/gkd-secret-property.c
@@ -377,8 +377,8 @@ static void
 iter_append_variant (DBusMessageIter *iter, DataType data_type, GckAttribute *attr)
 {
 	DBusMessageIter sub;
-	IterAppendFunc func;
-	const gchar *sig;
+	IterAppendFunc func = NULL;
+	const gchar *sig = NULL;
 
 	g_assert (iter);
 	g_assert (attr);
@@ -414,9 +414,9 @@ static gboolean
 iter_get_variant (DBusMessageIter *iter, DataType data_type, GckAttribute *attr)
 {
 	DBusMessageIter variant;
-	IterGetFunc func;
+	IterGetFunc func = NULL;
 	gboolean ret;
-	const gchar *sig;
+	const gchar *sig = NULL;
 	char *signature;
 
 	g_assert (iter);
diff --git a/daemon/ssh-agent/gkd-ssh-agent-ops.c b/daemon/ssh-agent/gkd-ssh-agent-ops.c
index 7e2e9fe..691ebe0 100644
--- a/daemon/ssh-agent/gkd-ssh-agent-ops.c
+++ b/daemon/ssh-agent/gkd-ssh-agent-ops.c
@@ -983,7 +983,7 @@ op_sign_request (GkdSshAgentCall *call)
 	gsize n_data, n_result;
 	guint32 flags;
 	gsize offset;
-	gboolean ret;
+	gboolean ret = FALSE;
 	guint blobpos, sz;
 	guint8 *hash;
 	gulong algo, mech;
diff --git a/egg/egg-asn1x.c b/egg/egg-asn1x.c
index aae8ddd..46d302c 100644
--- a/egg/egg-asn1x.c
+++ b/egg/egg-asn1x.c
@@ -1579,10 +1579,8 @@ anode_encode_prepare_choice (GNode *node, gboolean want)
 {
 	Atlv *tlv;
 	GNode *child;
-	gint type;
 
-	type = anode_def_type (node);
-	g_assert (type == TYPE_CHOICE);
+	g_assert (anode_def_type (node) == TYPE_CHOICE);
 
 	child = egg_asn1x_get_choice (node);
 	if (!child)
diff --git a/egg/egg-secure-memory.c b/egg/egg-secure-memory.c
index f699203..facc9fe 100644
--- a/egg/egg-secure-memory.c
+++ b/egg/egg-secure-memory.c
@@ -263,6 +263,8 @@ pool_free (void* item)
 	unused_push (&pool->unused, item);
 }
 
+#ifndef G_DISABLE_ASSERT
+
 static int
 pool_valid (void* item)
 {
@@ -282,6 +284,8 @@ pool_valid (void* item)
 	return 0;
 }
 
+#endif /* G_DISABLE_ASSERT */
+
 /* -----------------------------------------------------------------------------
  * SEC ALLOCATION
  * 
diff --git a/gcr/gcr-certificate-renderer.c b/gcr/gcr-certificate-renderer.c
index 5f53cb6..6c8535d 100644
--- a/gcr/gcr-certificate-renderer.c
+++ b/gcr/gcr-certificate-renderer.c
@@ -330,7 +330,7 @@ on_parsed_dn_part (guint index, GQuark oid, const guchar *value,
 	GcrDisplayView *view = ((on_parsed_dn_args*)user_data)->view;
 	const gchar *attr;
 	const gchar *desc;
-	gchar *field;
+	gchar *field = NULL;
 	gchar *display;
 
 	g_return_if_fail (GCR_IS_CERTIFICATE_RENDERER (self));
diff --git a/gcr/gcr-parser.c b/gcr/gcr-parser.c
index 1766e06..2162b98 100644
--- a/gcr/gcr-parser.c
+++ b/gcr/gcr-parser.c
@@ -1671,7 +1671,7 @@ gcr_parser_parse_data (GcrParser *self, gconstpointer data,
                        gsize n_data, GError **error)
 {
 	ForeachArgs args = { self, data, n_data, GCR_ERROR_UNRECOGNIZED };
-	const gchar *message;
+	const gchar *message = NULL;
 	gint i;
 	
 	g_return_val_if_fail (GCR_IS_PARSER (self), FALSE);
diff --git a/pkcs11/gnome2-store/gkm-gnome2-storage.c b/pkcs11/gnome2-store/gkm-gnome2-storage.c
index 6c8ef7f..feaf252 100644
--- a/pkcs11/gnome2-store/gkm-gnome2-storage.c
+++ b/pkcs11/gnome2-store/gkm-gnome2-storage.c
@@ -387,7 +387,7 @@ begin_modification_state (GkmGnome2Storage *self, GkmTransaction *transaction)
 {
 	GkmDataResult res;
 	struct stat sb;
-	CK_RV rv;
+	CK_RV rv = CKR_OK;
 
 	if (!begin_write_state (self, transaction))
 		return FALSE;
diff --git a/pkcs11/secret-store/gkm-secret-collection.c b/pkcs11/secret-store/gkm-secret-collection.c
index 0aedc5c..c8906d9 100644
--- a/pkcs11/secret-store/gkm-secret-collection.c
+++ b/pkcs11/secret-store/gkm-secret-collection.c
@@ -473,7 +473,7 @@ gkm_secret_collection_real_unlock (GkmObject *obj, GkmCredential *cred)
 	GkmDataResult res;
 	GkmSecretData *sdata;
 	GkmSecret *master;
-	CK_RV rv;
+	CK_RV rv = CKR_GENERAL_ERROR;
 
 	master = gkm_credential_get_secret (cred);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]