seahorse r2216 - in trunk: . daemon gkr libseahorse pgp src



Author: asaleem
Date: Thu May 22 02:54:48 2008
New Revision: 2216
URL: http://svn.gnome.org/viewvc/seahorse?rev=2216&view=rev

Log:
fix compiler errors and deprecated function usage

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/daemon/seahorse-hkp-server.c
   trunk/gkr/seahorse-gkeyring-item.c
   trunk/libseahorse/seahorse-context.c
   trunk/libseahorse/seahorse-dns-sd.c
   trunk/libseahorse/seahorse-unknown-key.c
   trunk/libseahorse/seahorse-util.c
   trunk/pgp/seahorse-gpgmex-util.c
   trunk/pgp/seahorse-pgp-key-op.c
   trunk/src/seahorse-gkeyring-item-properties.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu May 22 02:54:48 2008
@@ -442,7 +442,7 @@
 	    [Compile binaries in debug mode]))
 
 if test "$enable_debug" = "yes"; then
-  CFLAGS="$CFLAGS -g -O0 -DBONOBO_DISABLE_DEPRECATED -DDISABLE_DEPRECATED -Wall -Werror"
+  CFLAGS="$CFLAGS -g -O0 -DBONOBO_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -Wall -Werror"
   AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
   echo "enabling debug compile mode"
 else 

Modified: trunk/daemon/seahorse-hkp-server.c
==============================================================================
--- trunk/daemon/seahorse-hkp-server.c	(original)
+++ trunk/daemon/seahorse-hkp-server.c	Thu May 22 02:54:48 2008
@@ -290,7 +290,7 @@
     
     /* Get the various necessary arguments */
     t = (gchar*)g_hash_table_lookup(args, "fingerprint");
-    if (t && g_strcasecmp(t, "on") == 0)
+    if (t && g_ascii_strcasecmp(t, "on") == 0)
         fingerprints = TRUE;
     
     search = (const gchar*)g_hash_table_lookup(args, "search");
@@ -406,13 +406,13 @@
     if(!t || !t[0])
         code = lookup_handle_error(msg, "pks request did not include an <b>op</b> property", GPG_OK);
     
-    else if(g_strcasecmp(t, "index") == 0)
+    else if(g_ascii_strcasecmp(t, "index") == 0)
         code = lookup_handle_index(msg, args, FALSE);
     
-    else if(g_strcasecmp(t, "vindex") == 0)
+    else if(g_ascii_strcasecmp(t, "vindex") == 0)
         code = lookup_handle_index(msg, args, TRUE);
     
-    else if(g_strcasecmp(t, "get") == 0)
+    else if(g_ascii_strcasecmp(t, "get") == 0)
         code = lookup_handle_get(msg, args);
     
     else

Modified: trunk/gkr/seahorse-gkeyring-item.c
==============================================================================
--- trunk/gkr/seahorse-gkeyring-item.c	(original)
+++ trunk/gkr/seahorse-gkeyring-item.c	Thu May 22 02:54:48 2008
@@ -76,7 +76,7 @@
     
     for (i = 0; i < attrs->len; i++) {
         GnomeKeyringAttribute *attr = &(gnome_keyring_attribute_list_index (attrs, i));
-        if (g_strcasecmp (name, attr->name) == 0 && 
+        if (g_ascii_strcasecmp (name, attr->name) == 0 && 
             attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_UINT32)
             return attr->value.integer;
     }
@@ -96,7 +96,7 @@
         return TRUE;
     
     protocol = seahorse_gkeyring_item_get_attribute (git, "protocol");
-    return protocol && g_strncasecmp (protocol, match, strlen (match)) == 0;
+    return protocol && g_ascii_strncasecmp (protocol, match, strlen (match)) == 0;
 }
 
 static gboolean 
@@ -558,7 +558,7 @@
     
     for (i = 0; i < git->attributes->len; i++) {
         GnomeKeyringAttribute *attr = &(gnome_keyring_attribute_list_index (git->attributes, i));
-        if (g_strcasecmp (name, attr->name) == 0 && 
+        if (g_ascii_strcasecmp (name, attr->name) == 0 && 
             attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING)
             return attr->value.string;
     }

Modified: trunk/libseahorse/seahorse-context.c
==============================================================================
--- trunk/libseahorse/seahorse-context.c	(original)
+++ trunk/libseahorse/seahorse-context.c	Thu May 22 02:54:48 2008
@@ -365,7 +365,7 @@
 SeahorseKeySource*  
 seahorse_context_remote_key_source (SeahorseContext *sctx, const gchar *uri)
 {
-    SeahorseKeySource *ks;
+    SeahorseKeySource *ks = NULL;
     gboolean found = FALSE;
     gchar *ks_uri;
     GSList *l;

Modified: trunk/libseahorse/seahorse-dns-sd.c
==============================================================================
--- trunk/libseahorse/seahorse-dns-sd.c	(original)
+++ trunk/libseahorse/seahorse-dns-sd.c	Thu May 22 02:54:48 2008
@@ -117,7 +117,8 @@
     case AVAHI_RESOLVER_FOUND:
         
         /* Make sure it's our type ... */
-        if (g_strcasecmp (HKP_SERVICE_TYPE, type) != 0)
+        /* XXX Is the service always guaranteed to be ascii? */
+        if (g_ascii_strcasecmp (HKP_SERVICE_TYPE, type) != 0)
             break;
         
 #ifndef DISCOVER_THIS_HOST
@@ -164,7 +165,8 @@
     g_assert (SEAHORSE_IS_SERVICE_DISCOVERY (ssd));
     g_assert (browser == ssd->priv->browser);
     
-    if (g_strcasecmp (HKP_SERVICE_TYPE, type) != 0)
+     /* XXX Is the service always guaranteed to be ascii? */
+    if (g_ascii_strcasecmp (HKP_SERVICE_TYPE, type) != 0)
         return;
 
     switch (event) {

Modified: trunk/libseahorse/seahorse-unknown-key.c
==============================================================================
--- trunk/libseahorse/seahorse-unknown-key.c	(original)
+++ trunk/libseahorse/seahorse-unknown-key.c	Thu May 22 02:54:48 2008
@@ -110,7 +110,7 @@
     
     switch (prop_id) {
     case PROP_DISPLAY_NAME:
-        g_value_set_string_take_ownership (value, 
+        g_value_take_string (value, 
                 seahorse_unknown_key_get_name (SEAHORSE_KEY (ukey), 0));
         break;
     case PROP_DISPLAY_ID:

Modified: trunk/libseahorse/seahorse-util.c
==============================================================================
--- trunk/libseahorse/seahorse-util.c	(original)
+++ trunk/libseahorse/seahorse-util.c	Thu May 22 02:54:48 2008
@@ -125,7 +125,7 @@
 		return "0";
 	
 	created_date = g_date_new ();
-	g_date_set_time (created_date, time);
+	g_date_set_time_t (created_date, time);
 	created_string = g_new (gchar, 11);
 	g_date_strftime (created_string, 11, "%Y-%m-%d", created_date);
 	return created_string;
@@ -149,7 +149,7 @@
 		return "0";
 	
 	created_date = g_date_new ();
-	g_date_set_time (created_date, time);
+	g_date_set_time_t (created_date, time);
 	created_string = g_new (gchar, 11);
 	g_date_strftime (created_string, 11, _("%Y-%m-%d"), created_date);
 	return created_string;

Modified: trunk/pgp/seahorse-gpgmex-util.c
==============================================================================
--- trunk/pgp/seahorse-gpgmex-util.c	(original)
+++ trunk/pgp/seahorse-gpgmex-util.c	Thu May 22 02:54:48 2008
@@ -116,7 +116,7 @@
 gpgmex_data_write_all (gpgme_data_t data, const void* buffer, size_t len)
 {
 	guchar *text = (guchar*)buffer;
-	gint written;
+	gint written = 0;
     
 	if (len < 0)
 		len = strlen ((gchar*)text);

Modified: trunk/pgp/seahorse-pgp-key-op.c
==============================================================================
--- trunk/pgp/seahorse-pgp-key-op.c	(original)
+++ trunk/pgp/seahorse-pgp-key-op.c	Thu May 22 02:54:48 2008
@@ -2346,7 +2346,7 @@
                       const gchar *args, gpointer data, gpgme_error_t *err)
 {
     PhotoIdLoadParm *parm = (PhotoIdLoadParm*)data;
-    guint next_state;
+    guint next_state = 0;
     struct stat buf;
     GError *error = NULL;
 	

Modified: trunk/src/seahorse-gkeyring-item-properties.c
==============================================================================
--- trunk/src/seahorse-gkeyring-item-properties.c	(original)
+++ trunk/src/seahorse-gkeyring-item-properties.c	Thu May 22 02:54:48 2008
@@ -108,6 +108,8 @@
     case SEAHORSE_GKEYRING_USE_OTHER:
         label = _("Saved password or login");
         break;
+    default:
+        g_assert_not_reached ();
     }
     
     widget = seahorse_widget_get_widget (swidget, "use-field");



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