gvfs r1847 - in trunk: . client common daemon



Author: chpe
Date: Sat Aug  2 11:00:07 2008
New Revision: 1847
URL: http://svn.gnome.org/viewvc/gvfs?rev=1847&view=rev

Log:
Use g_set_error_literal where appropriate. Bug #539167.

Modified:
   trunk/ChangeLog
   trunk/client/gdaemonfile.c
   trunk/client/gdaemonfileinputstream.c
   trunk/client/gdaemonfileoutputstream.c
   trunk/client/gvfsdaemondbus.c
   trunk/common/gdbusutils.c
   trunk/common/gvfsdaemonprotocol.c
   trunk/daemon/gvfsbackendarchive.c
   trunk/daemon/gvfsbackendcdda.c
   trunk/daemon/gvfsbackenddav.c
   trunk/daemon/gvfsbackendftp.c
   trunk/daemon/gvfsbackendgphoto2.c
   trunk/daemon/gvfsbackendobexftp-cap-parser.c
   trunk/daemon/gvfsbackendobexftp-fl-parser.c
   trunk/daemon/gvfsbackendobexftp.c
   trunk/daemon/gvfsbackendsftp.c
   trunk/daemon/gvfsbackendsmb.c
   trunk/daemon/gvfsbackendsmbbrowse.c
   trunk/daemon/gvfsjob.c
   trunk/daemon/gvfsjobopenforwrite.c
   trunk/daemon/gvfsreadchannel.c
   trunk/daemon/gvfswritechannel.c
   trunk/daemon/mount.c
   trunk/daemon/soup-input-stream.c
   trunk/daemon/soup-output-stream.c

Modified: trunk/client/gdaemonfile.c
==============================================================================
--- trunk/client/gdaemonfile.c	(original)
+++ trunk/client/gdaemonfile.c	Sat Aug  2 11:00:07 2008
@@ -478,8 +478,8 @@
 	{
 	  g_mount_info_unref (mount_info1);
 	  /* For copy this will cause the fallback code to be involved */
-	  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		       "%s", _("Operation not supported, files on different mounts"));
+	  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+			       _("Operation not supported, files on different mounts"));
 	  return NULL;
 	}
     }
@@ -783,8 +783,8 @@
   if (!dbus_message_iter_init (reply, &iter) ||
       (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRUCT))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from get_info"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from get_info"));
       goto out;
     }
 
@@ -992,8 +992,8 @@
 			      DBUS_TYPE_INVALID))
     {
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from open"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from open"));
       return NULL;
     }
   
@@ -1002,8 +1002,8 @@
   fd = _g_dbus_connection_get_fd_sync (connection, fd_id);
   if (fd == -1)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Didn't get stream file descriptor"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Didn't get stream file descriptor"));
       return NULL;
     }
   
@@ -1051,8 +1051,8 @@
 			      DBUS_TYPE_INVALID))
     {
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from open"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from open"));
       return NULL;
     }
   
@@ -1061,8 +1061,8 @@
   fd = _g_dbus_connection_get_fd_sync (connection, fd_id);
   if (fd == -1)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Didn't get stream file descriptor"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Didn't get stream file descriptor"));
       return NULL;
     }
   
@@ -1110,8 +1110,8 @@
 			      DBUS_TYPE_INVALID))
     {
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from open"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from open"));
       return NULL;
     }
   
@@ -1120,8 +1120,8 @@
   fd = _g_dbus_connection_get_fd_sync (connection, fd_id);
   if (fd == -1)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Didn't get stream file descriptor"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Didn't get stream file descriptor"));
       return NULL;
     }
   
@@ -1172,8 +1172,8 @@
 			      DBUS_TYPE_INVALID))
     {
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from open"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from open"));
       return NULL;
     }
   
@@ -1182,8 +1182,8 @@
   fd = _g_dbus_connection_get_fd_sync (connection, fd_id);
   if (fd == -1)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Didn't get stream file descriptor"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Didn't get stream file descriptor"));
       return NULL;
     }
   
@@ -1530,8 +1530,8 @@
   if (!dbus_message_iter_init (reply, &iter) ||
       (dbus_message_iter_get_arg_type (&iter) != DBUS_TYPE_STRUCT))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from get_filesystem_info"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from get_filesystem_info"));
       goto out;
     }
 
@@ -1640,11 +1640,11 @@
 	return G_MOUNT (mount);
     }
 
-  g_set_error (error, G_IO_ERROR,
-	       G_IO_ERROR_NOT_FOUND,
+  g_set_error_literal (error, G_IO_ERROR,
+		       G_IO_ERROR_NOT_FOUND,
   /* translators: this is an error message when there is no user visible "mount" object
      corresponding to a particular path/uri */
-	       "%s", _("Could not find enclosing mount"));
+		       _("Could not find enclosing mount"));
   return NULL;
 }
 
@@ -1715,8 +1715,8 @@
 				      G_DBUS_TYPE_CSTRING, &new_path,
 				      0))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from query_filesystem_info"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from query_filesystem_info"));
       goto out;
     }
 
@@ -1958,7 +1958,7 @@
   if (!G_IS_DAEMON_FILE (destination))
     {
       /* Fall back to default move */
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", "Move not supported");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Move not supported");
       return FALSE;
     }
 
@@ -1975,8 +1975,8 @@
       if (local_path == NULL)
 	{
 	  /* This will cause the fallback code to be involved */
-	  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		       "%s", _("Operation not supported, files on different mounts"));
+	  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+			       _("Operation not supported, files on different mounts"));
 	  return FALSE;
 	}
     }
@@ -2048,7 +2048,7 @@
       !G_IS_DAEMON_FILE (destination))
     {
       /* Fall back to default move */
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", "Move not supported");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "Move not supported");
       return FALSE;
     }
   
@@ -2120,8 +2120,8 @@
     {
       g_mount_info_unref (mount_info);
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from monitor_dir"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from monitor_dir"));
       return NULL;
     }
   
@@ -2169,8 +2169,8 @@
     {
       g_mount_info_unref (mount_info);
       dbus_message_unref (reply);
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid return value from monitor_file"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid return value from monitor_file"));
       return NULL;
     }
   

Modified: trunk/client/gdaemonfileinputstream.c
==============================================================================
--- trunk/client/gdaemonfileinputstream.c	(original)
+++ trunk/client/gdaemonfileinputstream.c	Sat Aug  2 11:00:07 2008
@@ -377,11 +377,10 @@
 static void
 decode_error (GVfsDaemonSocketProtocolReply *reply, char *data, GError **error)
 {
-  g_set_error (error,
-	       g_quark_from_string (data),
-	       reply->arg1,
-               "%s",
-               data + strlen (data) + 1);
+  g_set_error_literal (error,
+		       g_quark_from_string (data),
+		       reply->arg1,
+        	       data + strlen (data) + 1);
 }
 
 
@@ -513,10 +512,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = -1;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-			   "%s", _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 	  
@@ -669,11 +668,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = -1;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-                           "%s",
-			   _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 	  
@@ -778,11 +776,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = FALSE;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-                           "%s",
-			   _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 
@@ -1029,11 +1026,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = -1;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-                           "%s",
-			   _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 
@@ -1207,8 +1203,8 @@
 
   if (!file->can_seek)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   "%s", _("Seek not supported on stream"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+			   _("Seek not supported on stream"));
       return FALSE;
     }
   
@@ -1238,7 +1234,7 @@
 				       GCancellable         *cancellable,
 				       GError              **error)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", _("The query info operation is not supported"));
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _("The query info operation is not supported"));
   
   return NULL;
 }

Modified: trunk/client/gdaemonfileoutputstream.c
==============================================================================
--- trunk/client/gdaemonfileoutputstream.c	(original)
+++ trunk/client/gdaemonfileoutputstream.c	Sat Aug  2 11:00:07 2008
@@ -329,11 +329,10 @@
 static void
 decode_error (GVfsDaemonSocketProtocolReply *reply, char *data, GError **error)
 {
-  g_set_error (error,
-	       g_quark_from_string (data),
-	       reply->arg1,
-               "%s",
-	       data + strlen (data) + 1);
+  g_set_error_literal (error,
+		       g_quark_from_string (data),
+		       reply->arg1,
+		       data + strlen (data) + 1);
 }
 
 
@@ -453,11 +452,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = -1;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-			   "%s",
-                           _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+                        	   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 	  
@@ -632,11 +630,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = FALSE;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-                           "%s",
-			   _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 
@@ -828,11 +825,10 @@
 	  if (io_op->io_cancelled)
 	    {
 	      op->ret_val = -1;
-	      g_set_error (&op->ret_error,
-			   G_IO_ERROR,
-			   G_IO_ERROR_CANCELLED,
-                           "%s",
-			   _("Operation was cancelled"));
+	      g_set_error_literal (&op->ret_error,
+				   G_IO_ERROR,
+				   G_IO_ERROR_CANCELLED,
+				   _("Operation was cancelled"));
 	      return STATE_OP_DONE;
 	    }
 
@@ -942,8 +938,8 @@
 
   if (!file->can_seek)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-		   "%s", _("Seek not supported on stream"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+			   _("Seek not supported on stream"));
       return FALSE;
     }
   

Modified: trunk/client/gvfsdaemondbus.c
==============================================================================
--- trunk/client/gvfsdaemondbus.c	(original)
+++ trunk/client/gvfsdaemondbus.c	Sat Aug  2 11:00:07 2008
@@ -881,10 +881,10 @@
   if (local)
     g_hash_table_remove (local->connections, dbus_id);
   
-  g_set_error (error,
-	       G_VFS_ERROR,
-	       G_VFS_ERROR_RETRY,
-	       "Cache invalid, retry (internally handled)");
+  g_set_error_literal (error,
+		       G_VFS_ERROR,
+		       G_VFS_ERROR_RETRY,
+		       "Cache invalid, retry (internally handled)");
 }
 
 DBusConnection *
@@ -954,7 +954,7 @@
       if (bus == NULL)
 	{
 	  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		       "Couldn't get main dbus connection: %s\n",
+		       "Couldn't get main dbus connection: %s",
 		       derror.message);
 	  dbus_error_free (&derror);
 	  return NULL;

Modified: trunk/common/gdbusutils.c
==============================================================================
--- trunk/common/gdbusutils.c	(original)
+++ trunk/common/gdbusutils.c	Sat Aug  2 11:00:07 2008
@@ -628,7 +628,7 @@
 	    code = atoi (end);
 	}
       
-      g_set_error (error, domain, code, "%s", derror->message);
+      g_set_error_literal (error, domain, code, derror->message);
     }
   /* TODO: Special case other types, like DBUS_ERROR_NO_MEMORY etc? */
   else
@@ -1345,8 +1345,8 @@
       connection = dbus_bus_get (DBUS_BUS_SESSION, &derror);
       if (connection == NULL)
 	{
-	  g_set_error (&data->io_error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		       "Can't open dbus connection");
+	  g_set_error_literal (&data->io_error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			       "Can't open dbus connection");
 	  g_idle_add (async_call_error_at_idle, data);
 	  return;
 	}

Modified: trunk/common/gvfsdaemonprotocol.c
==============================================================================
--- trunk/common/gvfsdaemonprotocol.c	(original)
+++ trunk/common/gvfsdaemonprotocol.c	Sat Aug  2 11:00:07 2008
@@ -511,8 +511,8 @@
 
  error:
   g_object_unref (info);
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-	       "%s", _("Invalid file info format"));
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+		       _("Invalid file info format"));
   return NULL;
 }
 
@@ -528,8 +528,8 @@
   if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_ARRAY ||
       dbus_message_iter_get_element_type (iter) != DBUS_TYPE_STRUCT)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Invalid attribute info list content"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid attribute info list content"));
       return NULL;
     }
 

Modified: trunk/daemon/gvfsbackendarchive.c
==============================================================================
--- trunk/daemon/gvfsbackendarchive.c	(original)
+++ trunk/daemon/gvfsbackendarchive.c	Sat Aug  2 11:00:07 2008
@@ -630,10 +630,10 @@
 
   if (!gvfs_archive_in_error (archive))
     {
-      g_set_error (&archive->error,
-		   G_IO_ERROR,
-		   G_IO_ERROR_NOT_FOUND,
-		   _("File doesn't exist"));
+      g_set_error_literal (&archive->error,
+			   G_IO_ERROR,
+			   G_IO_ERROR_NOT_FOUND,
+			   _("File doesn't exist"));
     }
   gvfs_archive_finish (archive);
 }

Modified: trunk/daemon/gvfsbackendcdda.c
==============================================================================
--- trunk/daemon/gvfsbackendcdda.c	(original)
+++ trunk/daemon/gvfsbackendcdda.c	Sat Aug  2 11:00:07 2008
@@ -220,7 +220,7 @@
     {
       release_device (cdda_backend);
       dbus_error_free (&dbus_error);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot connect to the system bus"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot connect to the system bus"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -230,7 +230,7 @@
   if (cdda_backend->hal_ctx == NULL)
     {
       release_device (cdda_backend);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create libhal context"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create libhal context"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -243,7 +243,7 @@
     {
       release_device (cdda_backend);
       dbus_error_free (&dbus_error);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot initialize libhal"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot initialize libhal"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -258,7 +258,7 @@
   //g_warning ("host=%s", host);
   if (host == NULL)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, "%s", _("No drive specified"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No drive specified"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       release_device (cdda_backend);
@@ -329,7 +329,7 @@
   //g_warning ("tm host=%s", host);
   if (host == NULL)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, "%s", _("No drive specified"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No drive specified"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return TRUE;

Modified: trunk/daemon/gvfsbackenddav.c
==============================================================================
--- trunk/daemon/gvfsbackenddav.c	(original)
+++ trunk/daemon/gvfsbackenddav.c	Sat Aug  2 11:00:07 2008
@@ -499,7 +499,6 @@
 
   if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
     {
-      
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
                    _("HTTP Error: %s"), msg->reason_phrase);
       return NULL;
@@ -516,8 +515,8 @@
                        XML_PARSE_COMPACT);
   if (doc == NULL)
     { 
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "%s", _("Could not parse response"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                   _("Could not parse response"));
       return NULL;
     }
 
@@ -525,15 +524,15 @@
 
   if (*root == NULL || (*root)->children == NULL)
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                   "%s", _("Empty response"));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                   _("Empty response"));
       return NULL;
     }
 
   if (strcmp ((char *) (*root)->name, name))
     {
-        g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                     "%s", _("Unexpected reply from server"));
+        g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                     _("Unexpected reply from server"));
       return NULL;
     }
 
@@ -1130,10 +1129,10 @@
 
   if (status != 207)
     {
-      g_set_error (error,
-                   G_IO_ERROR,
-                   http_error_code_from_status (status),
-                   "%s", msg->reason_phrase);
+      g_set_error_literal (error,
+	                   G_IO_ERROR,
+        	           http_error_code_from_status (status),
+                	   msg->reason_phrase);
 
       return FALSE;
     }
@@ -1141,9 +1140,9 @@
   res = stat_location_finish (msg, target_type, num_children);
 
   if (res == FALSE)
-    g_set_error (error, 
-                 G_IO_ERROR, G_IO_ERROR_FAILED,
-                 _("Response invalid"));
+    g_set_error_literal (error, 
+	                 G_IO_ERROR, G_IO_ERROR_FAILED,
+        	         _("Response invalid"));
 
   return res;
 }

Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c	(original)
+++ trunk/daemon/gvfsbackendftp.c	Sat Aug  2 11:00:07 2008
@@ -290,7 +290,7 @@
     }
 
   DEBUG ("error: %s\n", msg);
-  g_set_error (&conn->error, G_IO_ERROR, code, "%s", msg);
+  g_set_error_literal (&conn->error, G_IO_ERROR, code, msg);
 }
 
 /**
@@ -360,8 +360,8 @@
 	    }
 	  else
 	    {
-	      g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-			   _("Invalid reply"));
+	      g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+				   _("Invalid reply"));
 	      return 0;
 	    }
 	}
@@ -389,8 +389,8 @@
 	      break;
 	    if (n_bytes > 0)
 	      continue;
-	    g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-			 _("Invalid reply"));
+	    g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+				 _("Invalid reply"));
 	    /* fall through */
 	  case SOUP_SOCKET_ERROR:
 	    conn->read_buffer[conn->read_bytes] = 0;
@@ -408,8 +408,8 @@
 	      last_line[1] < '0' || last_line[1] > '9' ||
 	      last_line[2] < '0' || last_line[2] > '9')
 	    {
-	      g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-			   _("Invalid reply"));
+	      g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+				   _("Invalid reply"));
 	      return 0;
 	    }
 	  response = 100 * (last_line[0] - '0') +
@@ -421,8 +421,8 @@
 	    reply_state = MULTILINE;
 	  else
 	    {
-	      g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-			   _("Invalid reply"));
+	      g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+				   _("Invalid reply"));
 	      return 0;
 	    }
 	}
@@ -528,8 +528,8 @@
       case SOUP_SOCKET_EOF:
 	if (n_bytes == command->len)
 	  break;
-	g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-	    _("broken transmission"));
+	g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			     _("broken transmission"));
 	/* fall through */
       case SOUP_SOCKET_ERROR:
 	g_string_free (command, TRUE);
@@ -671,10 +671,10 @@
   if (!SOUP_STATUS_IS_SUCCESSFUL (status))
     {
       /* FIXME: better error messages depending on status please */
-      g_set_error (&conn->error,
-		   G_IO_ERROR,
-		   G_IO_ERROR_HOST_NOT_FOUND,
-		   _("Could not connect to host"));
+      g_set_error_literal (&conn->error,
+			   G_IO_ERROR,
+			   G_IO_ERROR_HOST_NOT_FOUND,
+			   _("Could not connect to host"));
     }
 
   ftp_connection_receive (conn, 0);
@@ -813,8 +813,8 @@
     }
   if (*s == 0)
     {
-      g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   _("Invalid reply"));
+      g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Invalid reply"));
       return FALSE;
     }
   ip = g_strdup_printf ("%u.%u.%u.%u", ip1, ip2, ip3, ip4);
@@ -831,10 +831,10 @@
   if (!SOUP_STATUS_IS_SUCCESSFUL (status))
     {
       /* FIXME: better error messages depending on status please */
-      g_set_error (&conn->error,
-		   G_IO_ERROR,
-		   G_IO_ERROR_HOST_NOT_FOUND,
-		   _("Could not connect to host"));
+      g_set_error_literal (&conn->error,
+			   G_IO_ERROR,
+			   G_IO_ERROR_HOST_NOT_FOUND,
+			   _("Could not connect to host"));
       g_object_unref (conn->data);
       conn->data = NULL;
       return FALSE;
@@ -907,9 +907,9 @@
 					"CWD %s", file);
   if (response == 550)
     {
-      g_set_error (&conn->error, 
-	           G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY,
-		   _("The file is not a directory"));
+      g_set_error_literal (&conn->error, 
+		           G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY,
+			   _("The file is not a directory"));
       response = 0;
     }
   else if (STATUS_GROUP (response) == 5)
@@ -1358,8 +1358,8 @@
 		        &password_save) ||
 	  aborted) 
 	{
-	  g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-		       "%s", _("Password dialog cancelled"));
+	  g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+			       _("Password dialog cancelled"));
 	  break;
 	}
 
@@ -1524,9 +1524,9 @@
 
   if (STATUS_GROUP (response) == 2)
     {
-      g_set_error (&conn->error, G_IO_ERROR, 
-                   G_IO_ERROR_IS_DIRECTORY,
-                   _("File is directory"));
+      g_set_error_literal (&conn->error, G_IO_ERROR, 
+	                   G_IO_ERROR_IS_DIRECTORY,
+        	           _("File is directory"));
     }
 }
 
@@ -1693,10 +1693,10 @@
   if (info)
     {
       g_object_unref (info);
-      g_set_error (&conn->error,
-	           G_IO_ERROR,
-		   G_IO_ERROR_EXISTS,
-		   _("Target file already exists"));
+      g_set_error_literal (&conn->error,
+		           G_IO_ERROR,
+			   G_IO_ERROR_EXISTS,
+			   _("Target file already exists"));
       goto error;
     }
   file = ftp_filename_from_gvfs_path (conn, filename);
@@ -1824,8 +1824,8 @@
 	{
 	  if (size >= 16384)
 	    {
-	      g_set_error (&conn->error, G_IO_ERROR, G_IO_ERROR_FILENAME_TOO_LONG,
-		           _("filename too long"));
+	      g_set_error_literal (&conn->error, G_IO_ERROR, G_IO_ERROR_FILENAME_TOO_LONG,
+			           _("filename too long"));
 	      break;
 	    }
 	  size += 128;
@@ -2095,10 +2095,10 @@
       g_object_unref (real);
     }
   else if (!ftp_connection_in_error (conn))
-    g_set_error (&conn->error,
-		 G_IO_ERROR,
-		 G_IO_ERROR_NOT_FOUND,
-		 _("File doesn't exist"));
+    g_set_error_literal (&conn->error,
+			 G_IO_ERROR,
+			 G_IO_ERROR_NOT_FOUND,
+			 _("File doesn't exist"));
 
   g_vfs_backend_ftp_push_connection (ftp, conn);
 }
@@ -2205,10 +2205,10 @@
   now = ftp_filename_construct (conn, dir, display_name);
   if (now == NULL)
     {
-      g_set_error (&conn->error, 
-	           G_IO_ERROR,
-	           G_IO_ERROR_INVALID_FILENAME,
-		   _("Invalid filename"));
+      g_set_error_literal (&conn->error, 
+		           G_IO_ERROR,
+		           G_IO_ERROR_INVALID_FILENAME,
+			   _("Invalid filename"));
     }
   ftp_connection_send (conn,
 		       RESPONSE_PASS_300 | RESPONSE_FAIL_200,
@@ -2258,10 +2258,10 @@
 	  if (files)
 	    {
 	      g_static_rw_lock_reader_unlock (&ftp->directory_cache_lock);
-	      g_set_error (&conn->error, 
-			   G_IO_ERROR,
-			   G_IO_ERROR_NOT_EMPTY,
-			   "%s", g_strerror (ENOTEMPTY));
+	      g_set_error_literal (&conn->error, 
+				   G_IO_ERROR,
+				   G_IO_ERROR_NOT_EMPTY,
+				   g_strerror (ENOTEMPTY));
 	    }
 	  else
 	    ftp_connection_set_error_from_response (conn, response);
@@ -2340,9 +2340,9 @@
 
       g_free (basename);
       if (real == NULL)
-	g_set_error (&conn->error, 
-	             G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME,
-		     _("Invalid destination filename"));
+	g_set_error_literal (&conn->error, 
+		             G_IO_ERROR, G_IO_ERROR_INVALID_FILENAME,
+			     _("Invalid destination filename"));
       else
 	{
 	  g_free (destfile);
@@ -2359,10 +2359,10 @@
       if (info)
 	{
 	  g_object_unref (info);
-	  g_set_error (&conn->error,
-		       G_IO_ERROR,
-	               G_IO_ERROR_EXISTS,
-		       _("Target file already exists"));
+	  g_set_error_literal (&conn->error,
+			       G_IO_ERROR,
+		               G_IO_ERROR_EXISTS,
+			       _("Target file already exists"));
 	  goto out;
 	}
     }

Modified: trunk/daemon/gvfsbackendgphoto2.c
==============================================================================
--- trunk/daemon/gvfsbackendgphoto2.c	(original)
+++ trunk/daemon/gvfsbackendgphoto2.c	Sat Aug  2 11:00:07 2008
@@ -1399,7 +1399,7 @@
     {
       release_device (gphoto2_backend);
       dbus_error_free (&dbus_error);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot connect to the system bus"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot connect to the system bus"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -1411,7 +1411,7 @@
   if (gphoto2_backend->hal_ctx == NULL)
     {
       release_device (gphoto2_backend);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create libhal context"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create libhal context"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -1424,7 +1424,7 @@
     {
       release_device (gphoto2_backend);
       dbus_error_free (&dbus_error);
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot initialize libhal"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot initialize libhal"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -1439,7 +1439,7 @@
   DEBUG ("  host='%s'", host);
   if (host == NULL || strlen (host) < 3 || host[0] != '[' || host[strlen (host) - 1] != ']')
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No device specified"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No device specified"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       release_device (gphoto2_backend);
@@ -1456,7 +1456,7 @@
   gphoto2_backend->context = gp_context_new ();
   if (gphoto2_backend->context == NULL)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create gphoto2 context"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Cannot create gphoto2 context"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       release_device (gphoto2_backend);
@@ -1624,7 +1624,7 @@
   DEBUG ("  host=%s", host);
   if (host == NULL)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No camera specified"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("No camera specified"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return TRUE;

Modified: trunk/daemon/gvfsbackendobexftp-cap-parser.c
==============================================================================
--- trunk/daemon/gvfsbackendobexftp-cap-parser.c	(original)
+++ trunk/daemon/gvfsbackendobexftp-cap-parser.c	Sat Aug  2 11:00:07 2008
@@ -441,10 +441,10 @@
 		caps = NULL;
 
 		if (*error == NULL) {
-			g_set_error (error,
-				     G_MARKUP_ERROR,
-				     G_MARKUP_ERROR_INVALID_CONTENT,
-				     "Couldn't parse the incoming data");
+			g_set_error_literal (error,
+					     G_MARKUP_ERROR,
+					     G_MARKUP_ERROR_INVALID_CONTENT,
+					     "Couldn't parse the incoming data");
 		}
 
 		cap_parser_free (data, TRUE);

Modified: trunk/daemon/gvfsbackendobexftp-fl-parser.c
==============================================================================
--- trunk/daemon/gvfsbackendobexftp-fl-parser.c	(original)
+++ trunk/daemon/gvfsbackendobexftp-fl-parser.c	Sat Aug  2 11:00:07 2008
@@ -367,10 +367,10 @@
 		fl_parser_free_parser_data (data, TRUE);
 
 		if (*error == NULL) {
-			g_set_error (error,
-				     G_MARKUP_ERROR,
-				     G_MARKUP_ERROR_INVALID_CONTENT,
-				     "Couldn't parse the incoming data");
+			g_set_error_literal (error,
+					     G_MARKUP_ERROR,
+					     G_MARKUP_ERROR_INVALID_CONTENT,
+					     "Couldn't parse the incoming data");
 		}
 		return FALSE;
 	}

Modified: trunk/daemon/gvfsbackendobexftp.c
==============================================================================
--- trunk/daemon/gvfsbackendobexftp.c	(original)
+++ trunk/daemon/gvfsbackendobexftp.c	Sat Aug  2 11:00:07 2008
@@ -483,9 +483,9 @@
 
   if (found == FALSE)
     {
-      g_set_error (error, G_IO_ERROR,
-                   G_IO_ERROR_NOT_FOUND,
-                   "%s", g_strerror (ENOENT));
+      g_set_error_literal (error, G_IO_ERROR,
+	                   G_IO_ERROR_NOT_FOUND,
+        	           g_strerror (ENOENT));
     }
 
   g_free (basename);
@@ -1305,9 +1305,9 @@
       if (len != 0)
         {
           g_mutex_unlock (op_backend->mutex);
-          g_set_error (&error, G_IO_ERROR,
-                       G_IO_ERROR_NOT_EMPTY,
-                       "%s", g_strerror (ENOTEMPTY));
+          g_set_error_literal (&error, G_IO_ERROR,
+	                       G_IO_ERROR_NOT_EMPTY,
+        	               g_strerror (ENOTEMPTY));
           g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
           g_error_free (error);
           return;

Modified: trunk/daemon/gvfsbackendsftp.c
==============================================================================
--- trunk/daemon/gvfsbackendsftp.c	(original)
+++ trunk/daemon/gvfsbackendsftp.c	Sat Aug  2 11:00:07 2008
@@ -275,45 +275,45 @@
       if (line == NULL)
         {
           /* Error (real or WOULDBLOCK) or EOF */
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "%s", _("ssh program unexpectedly exited"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_FAILED,
+        	               _("ssh program unexpectedly exited"));
           return;
         }
       
       if (strstr (line, "Permission denied") != NULL)
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-                       "%s", _("Permission denied"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+        	               _("Permission denied"));
           return;
         }
       else if (strstr (line, "Name or service not known") != NULL)
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
-                       "%s", _("Hostname not known"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
+        	               _("Hostname not known"));
           return;
         }
       else if (strstr (line, "No route to host") != NULL)
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
-                       "%s", _("No route to host"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND,
+        	               _("No route to host"));
           return;
         }
       else if (strstr (line, "Connection refused") != NULL)
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-                       "%s", _("Connection refused by server"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+        	               _("Connection refused by server"));
           return;
         }
       else if (strstr (line, "Host key verification failed") != NULL) 
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "%s", _("Host key verification failed"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_FAILED,
+        	               _("Host key verification failed"));
           return;
         }
       
@@ -394,9 +394,9 @@
 		     stdin_fd, stdout_fd, stderr_fd);
   if (*tty_fd == -1)
     {
-      g_set_error (error,
-		   G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "%s", _("Unable to spawn ssh program"));
+      g_set_error_literal (error,
+			   G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("Unable to spawn ssh program"));
       return FALSE;
     }
 #else
@@ -522,9 +522,9 @@
 
   if (ret <= 0)
     {
-      g_set_error (error,
-		   G_IO_ERROR, G_IO_ERROR_TIMED_OUT,
-		   "%s", _("Timed out when logging in"));
+      g_set_error_literal (error,
+			   G_IO_ERROR, G_IO_ERROR_TIMED_OUT,
+			   _("Timed out when logging in"));
       return FALSE;
     }
   return TRUE;
@@ -774,9 +774,9 @@
       
       if (ret <= 0)
         {
-          g_set_error (error,
-                       G_IO_ERROR, G_IO_ERROR_TIMED_OUT,
-                       "%s", _("Timed out when logging in"));
+          g_set_error_literal (error,
+	                       G_IO_ERROR, G_IO_ERROR_TIMED_OUT,
+        	               _("Timed out when logging in"));
           ret_val = FALSE;
           break;
         }
@@ -868,9 +868,9 @@
                                                 &password_save) ||
                   aborted)
                 {
-                  g_set_error (error,
-                               G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-                               "%s", _("Password dialog cancelled"));
+                  g_set_error_literal (error,
+	                               G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+        	                       _("Password dialog cancelled"));
                   ret_val = FALSE;
                   break;
                 }
@@ -895,9 +895,9 @@
 	      op_backend->tmp_password = new_password;
 	      new_password = NULL;
 	      
-	      g_set_error (error,
-			   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-			   "Invalid user name");
+	      g_set_error_literal (error,
+				   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+				   "Invalid user name");
 	      ret_val = FALSE;
 	      break;
 	    }
@@ -915,9 +915,9 @@
                                           &bytes_written,
                                           NULL, NULL))
             {
-              g_set_error (error,
-                           G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-                           "%s", _("Can't send password"));
+              g_set_error_literal (error,
+	                           G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+        	                   _("Can't send password"));
               ret_val = FALSE;
               break;
             }
@@ -953,9 +953,9 @@
 					    &choice) || 
 	      aborted)
 	    {
-	      g_set_error (error,
-			   G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-			   "%s", _("Login dialog cancelled"));
+	      g_set_error_literal (error,
+				   G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+				   _("Login dialog cancelled"));
 	      g_free (message);
 	      ret_val = FALSE;
 	      break;
@@ -973,9 +973,9 @@
 					  &bytes_written,
 					  NULL, NULL))
 	    {
-	      g_set_error (error,
-			   G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
-			   "%s", _("Can't send host identity confirmation"));
+	      g_set_error_literal (error,
+				   G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED,
+				   _("Can't send host identity confirmation"));
 	      ret_val = FALSE;
 	      break;
 	    }
@@ -1468,7 +1468,7 @@
   
   if (g_data_input_stream_read_byte (reply, NULL, NULL) != SSH_FXP_VERSION)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, "%s", _("Protocol error"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Protocol error"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -1491,7 +1491,7 @@
 
   if (!get_uid_sync (op_backend))
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, "%s", _("Protocol error"));
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, _("Protocol error"));
       g_vfs_job_failed_from_error (G_VFS_JOB (job), error);
       g_error_free (error);
       return;
@@ -2258,8 +2258,8 @@
   if (reply_type == SSH_FXP_STATUS)
     res = error_from_status (job, reply, -1, -1, &error);
   else
-    g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                 "%s", _("Invalid reply received"));
+    g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                 _("Invalid reply received"));
 
   if (res)
     {
@@ -2304,8 +2304,8 @@
   if (reply_type == SSH_FXP_STATUS)
     res = error_from_status (job, reply, -1, -1, &error);
   else
-    g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                 "%s", _("Invalid reply received"));
+    g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                 _("Invalid reply received"));
 
   if (res)
     {
@@ -2379,8 +2379,8 @@
   if (reply_type == SSH_FXP_STATUS)
     res = error_from_status (job, reply, -1, -1, &error);
   else
-    g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                 "%s", _("Invalid reply received"));
+    g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+	                 _("Invalid reply received"));
 
   if (res)
     {

Modified: trunk/daemon/gvfsbackendsmb.c
==============================================================================
--- trunk/daemon/gvfsbackendsmb.c	(original)
+++ trunk/daemon/gvfsbackendsmb.c	Sat Aug  2 11:00:07 2008
@@ -1015,9 +1015,9 @@
     {
       int errsv = errno;
 
-      g_set_error (&error, G_IO_ERROR,
-		   g_io_error_from_errno (errsv),
-		   "%s", g_strerror (errsv));
+      g_set_error_literal (&error, G_IO_ERROR,
+			   g_io_error_from_errno (errsv),
+			   g_strerror (errsv));
       goto error;
     }
   else if (file == NULL && errno == EEXIST)
@@ -1032,11 +1032,10 @@
 	      if (strcmp (etag, current_etag) != 0)
 		{
 		  g_free (current_etag);
-		  g_set_error (&error,
-			       G_IO_ERROR,
-			       G_IO_ERROR_WRONG_ETAG,
-			       "%s",
-                               _("The file was externally modified"));
+		  g_set_error_literal (&error,
+				       G_IO_ERROR,
+				       G_IO_ERROR_WRONG_ETAG,
+                	               _("The file was externally modified"));
 		  goto error;
 		}
 	      g_free (current_etag);
@@ -1064,17 +1063,15 @@
 	      if (!copy_file (op_backend, G_VFS_JOB (job), uri, backup_uri))
 		{
 		  if (g_vfs_job_is_cancelled (G_VFS_JOB (job)))
-		    g_set_error (&error,
-				 G_IO_ERROR,
-				 G_IO_ERROR_CANCELLED,
-                                 "%s",
-				 _("Operation was cancelled"));
+		    g_set_error_literal (&error,
+					 G_IO_ERROR,
+					 G_IO_ERROR_CANCELLED,
+					 _("Operation was cancelled"));
 		  else
-		    g_set_error (&error,
-				 G_IO_ERROR,
-				 G_IO_ERROR_CANT_CREATE_BACKUP,
-                                 "%s",
-				 _("Backup file creation failed"));
+		    g_set_error_literal (&error,
+					 G_IO_ERROR,
+					 G_IO_ERROR_CANT_CREATE_BACKUP,
+					 _("Backup file creation failed"));
 		  goto error;
 		}
 	      g_free (backup_uri);
@@ -1087,9 +1084,9 @@
 	    {
               int errsv = errno;
 
-	      g_set_error (&error, G_IO_ERROR,
-			   g_io_error_from_errno (errsv),
-			   "%s", g_strerror (errsv));
+	      g_set_error_literal (&error, G_IO_ERROR,
+				   g_io_error_from_errno (errsv),
+				   g_strerror (errsv));
 	      goto error;
 	    }
 	}
@@ -1540,9 +1537,9 @@
       int errsv = errno;
 
       error = NULL;
-      g_set_error (&error, G_IO_ERROR,
-		   g_io_error_from_errno (errsv),
-		   "%s", g_strerror (errsv));
+      g_set_error_literal (&error, G_IO_ERROR,
+			   g_io_error_from_errno (errsv),
+			   g_strerror (errsv));
       goto error;
     }
 

Modified: trunk/daemon/gvfsbackendsmbbrowse.c
==============================================================================
--- trunk/daemon/gvfsbackendsmbbrowse.c	(original)
+++ trunk/daemon/gvfsbackendsmbbrowse.c	Sat Aug  2 11:00:07 2008
@@ -794,14 +794,14 @@
 	  g_mount_spec_unref (mount_spec);
 	}
       else
-	g_set_error (&error,
-		     G_IO_ERROR, G_IO_ERROR_NOT_MOUNTABLE_FILE,
-		     "%s", _("The file is not a mountable"));
+	g_set_error_literal (&error,
+			     G_IO_ERROR, G_IO_ERROR_NOT_MOUNTABLE_FILE,
+			     _("The file is not a mountable"));
     }
   else
-    g_set_error (&error,
-		 G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-		 "%s", _("File doesn't exist"));
+    g_set_error_literal (&error,
+			 G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+			 _("File doesn't exist"));
       
   g_mutex_unlock (backend->entries_lock);
 

Modified: trunk/daemon/gvfsjob.c
==============================================================================
--- trunk/daemon/gvfsjob.c	(original)
+++ trunk/daemon/gvfsjob.c	Sat Aug  2 11:00:07 2008
@@ -289,9 +289,9 @@
 {
   GError *error = NULL;
   
-  g_set_error (&error, G_IO_ERROR,
-	       g_io_error_from_errno (errno_arg),
-	       "%s", g_strerror (errno_arg));
+  g_set_error_literal (&error, G_IO_ERROR,
+		       g_io_error_from_errno (errno_arg),
+		       g_strerror (errno_arg));
   g_vfs_job_failed_from_error (job, error);
   g_error_free (error);
 }

Modified: trunk/daemon/gvfsjobopenforwrite.c
==============================================================================
--- trunk/daemon/gvfsjobopenforwrite.c	(original)
+++ trunk/daemon/gvfsjobopenforwrite.c	Sat Aug  2 11:00:07 2008
@@ -226,8 +226,8 @@
   else
     {
       GError *error = NULL;
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-		   "Wrong open for write type");
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
+			   "Wrong open for write type");
       g_vfs_job_failed_from_error (job, error);
       g_error_free (error);
       return TRUE;

Modified: trunk/daemon/gvfsreadchannel.c
==============================================================================
--- trunk/daemon/gvfsreadchannel.c	(original)
+++ trunk/daemon/gvfsreadchannel.c	Sat Aug  2 11:00:07 2008
@@ -172,7 +172,7 @@
     default:
       g_set_error (error, G_IO_ERROR,
 		   G_IO_ERROR_FAILED,
-		   "Unknown stream command %"G_GUINT32_FORMAT"\n", command);
+		   "Unknown stream command %"G_GUINT32_FORMAT, command);
       break;
     }
 

Modified: trunk/daemon/gvfswritechannel.c
==============================================================================
--- trunk/daemon/gvfswritechannel.c	(original)
+++ trunk/daemon/gvfswritechannel.c	Sat Aug  2 11:00:07 2008
@@ -139,7 +139,7 @@
     default:
       g_set_error (error, G_IO_ERROR,
 		   G_IO_ERROR_FAILED,
-		   "Unknown stream command %"G_GUINT32_FORMAT"\n", command);
+		   "Unknown stream command %"G_GUINT32_FORMAT, command);
       break;
     }
 

Modified: trunk/daemon/mount.c
==============================================================================
--- trunk/daemon/mount.c	(original)
+++ trunk/daemon/mount.c	Sat Aug  2 11:00:07 2008
@@ -435,14 +435,14 @@
 				  DBUS_TYPE_STRING, &error_message,
 				  DBUS_TYPE_INVALID))
 	{
-	  g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		       "%s", _("Invalid arguments from spawned child"));
+	  g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			       _("Invalid arguments from spawned child"));
 	  mount_finish (data, error);
 	  g_error_free (error);
 	}
       else if (!succeeded)
 	{
-	  g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED, "%s", error_message);
+	  g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED, error_message);
 	  mount_finish (data, error);
 	  g_error_free (error);
 	}
@@ -472,8 +472,8 @@
   error = NULL;
   if (data->mountable->exec == NULL)
     {
-      g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-		   "No exec key defined for mountpoint");
+      g_set_error_literal (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
+			   "No exec key defined for mountpoint");
       mount_finish (data, error);
       g_error_free (error);
     }

Modified: trunk/daemon/soup-input-stream.c
==============================================================================
--- trunk/daemon/soup-input-stream.c	(original)
+++ trunk/daemon/soup-input-stream.c	Sat Aug  2 11:00:07 2008
@@ -381,8 +381,8 @@
 {
   if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
     {
-      g_set_error (error, SOUP_HTTP_ERROR,
-		   msg->status_code, "%s", msg->reason_phrase);
+      g_set_error_literal (error, SOUP_HTTP_ERROR,
+			   msg->status_code, msg->reason_phrase);
       return TRUE;
     }
   return FALSE;
@@ -849,8 +849,8 @@
        * We could find the Content-Length by doing a HEAD...
        */
 
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-                   "G_SEEK_END not currently supported");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+	                   "G_SEEK_END not currently supported");
       return FALSE;
     }
 
@@ -902,8 +902,8 @@
 			    GCancellable  *cancellable,
 			    GError       **error)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
-	       "Truncate not allowed on input stream");
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+		       "Truncate not allowed on input stream");
   return FALSE;
 }
 

Modified: trunk/daemon/soup-output-stream.c
==============================================================================
--- trunk/daemon/soup-output-stream.c	(original)
+++ trunk/daemon/soup-output-stream.c	Sat Aug  2 11:00:07 2008
@@ -239,8 +239,8 @@
 {
   if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code))
     {
-      g_set_error (error, SOUP_HTTP_ERROR,
-		   msg->status_code, "%s", msg->reason_phrase);
+      g_set_error_literal (error, SOUP_HTTP_ERROR,
+			   msg->status_code, msg->reason_phrase);
       return TRUE;
     }
   return FALSE;
@@ -256,8 +256,8 @@
   SoupOutputStreamPrivate *priv = SOUP_OUTPUT_STREAM_GET_PRIVATE (stream);
 
   if (priv->size > 0 && priv->offset + count > priv->size) {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
-		   "Write would exceed caller-defined file size");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
+			   "Write would exceed caller-defined file size");
       return -1;
   }
 
@@ -274,8 +274,8 @@
   SoupOutputStreamPrivate *priv = SOUP_OUTPUT_STREAM_GET_PRIVATE (stream);
 
   if (priv->size > 0 && priv->offset != priv->size) {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
-		   "File is incomplete");
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
+			   "File is incomplete");
       return -1;
   }
 



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