Fix compile warnings when building with --disable-debug
authorStef Walter <stefw@collabora.co.uk>
Tue, 30 Aug 2011 11:36:15 +0000 (13:36 +0200)
committerStef Walter <stefw@collabora.co.uk>
Tue, 30 Aug 2011 11:36:15 +0000 (13:36 +0200)
egg/egg-asn1x.c
egg/egg-secure-memory.c
gcr/gcr-certificate-renderer.c
gcr/gcr-parser.c

index aae8ddd..46d302c 100644 (file)
@@ -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)
index 2433ce6..1012a35 100644 (file)
@@ -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
  *
index 5f53cb6..6c8535d 100644 (file)
@@ -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));
index c1180c7..77712e2 100644 (file)
@@ -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);