patch for build warnings



Here's a patch to prevent 64-bit warnings:

passing arg 1 of `g_strdup' makes pointer from integer without a cast

Our build system requires that we patch out these warnings. So I thought
I'd upstream it.

-Gary
diff -pruN -x '*~' f-spot-0.0.6-orig/libfspot/f-jpeg-utils.c f-spot-0.0.6/libfspot/f-jpeg-utils.c
--- f-spot-0.0.6-orig/libfspot/f-jpeg-utils.c	Sat Nov  8 07:52:42 2003
+++ f-spot-0.0.6/libfspot/f-jpeg-utils.c	Tue Feb  1 00:06:11 2005
@@ -418,7 +418,7 @@ f_transform_jpeg  (const char      *sour
 	   file exists.  */
 	if (! g_file_test (source_path, G_FILE_TEST_EXISTS)) {
 		if (error_message_return != NULL)
-			*error_message_return = g_strdup (_("File not found"));
+			*error_message_return = g_strdup ((gpointer)_("File not found"));
 		return FALSE;
 	}
 
@@ -441,7 +441,7 @@ f_transform_jpeg  (const char      *sour
 	default:
 		g_warning (G_GNUC_FUNCTION ": unknown transform type %d", transform);
 		if (error_message_return != NULL)
-			*error_message_return = g_strdup_printf (_("Unknown transform type %d"), transform);
+			*error_message_return = g_strdup_printf ((gpointer)_("Unknown transform type %d"), transform);
 		return FALSE;
 	}
 
@@ -449,7 +449,7 @@ f_transform_jpeg  (const char      *sour
 	/* Also note how the jpegtran() args are not const-safe.  */
 	if (jpegtran ((char *) source_path, (char *) destination_path, jpegtran_transform) != 0) {
 		if (error_message_return != NULL)
-			*error_message_return = g_strdup (_("Operation failed"));
+			*error_message_return = g_strdup ((gpointer)_("Operation failed"));
 		return FALSE;
 	}
 


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