[patch] 64-bit cleanliness fixes



Attached patch is a first level pass at making NM 64-bit clean.  This is
mostly just fixing the error messages from gcc-4.0 on an x86-64 system.

	Robert Love

 NetworkManagerDevice.c |   10 +++++-----
 NetworkManagerUtils.c  |   12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

Index: src/NetworkManagerDevice.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDevice.c,v
retrieving revision 1.134
diff -u -r1.134 NetworkManagerDevice.c
--- src/NetworkManagerDevice.c	8 Jun 2005 20:29:42 -0000	1.134
+++ src/NetworkManagerDevice.c	9 Jun 2005 21:07:52 -0000
@@ -1620,7 +1620,7 @@
 {
 	NMDevice *dev = args[0];
 	gboolean *err = args[1];
-	gboolean cancelable = (gboolean)args[2];
+	gboolean cancelable = GPOINTER_TO_INT (args[2]);
 
 	g_return_val_if_fail (dev != NULL, TRUE);
 	g_return_val_if_fail (err != NULL, TRUE);
@@ -1653,7 +1653,7 @@
 
 	args[0] = dev;
 	args[1] = &err;
-	args[2] = (void *)cancelable;
+	args[2] = GINT_TO_POINTER (cancelable);
 	nm_wait_for_completion (400, G_USEC_PER_SEC / 200, NULL, nm_completion_device_is_up_test, args);
 	if (err)
 		nm_info ("failed to bring device up");
@@ -1671,7 +1671,7 @@
 {
 	NMDevice *dev = args[0];
 	gboolean *err = args[1];
-	gboolean cancelable = (gboolean)args[2];
+	gboolean cancelable = GPOINTER_TO_INT (args[2]);
 
 	g_return_val_if_fail (dev != NULL, TRUE);
 	g_return_val_if_fail (err != NULL, TRUE);
@@ -1697,7 +1697,7 @@
 
 	args[0] = dev;
 	args[1] = &err;
-	args[2] = (void *)cancelable;
+	args[2] = GINT_TO_POINTER (cancelable);
 	nm_wait_for_completion(400, G_USEC_PER_SEC / 200, NULL,
 			nm_completion_device_is_down_test, args);
 	if (err)
@@ -2278,7 +2278,7 @@
 	guint *		assoc_count = args[1];
 	double *		last_freq = args[2];
 	char *		essid = args[3];
-	int			required = (int) args[4];
+	int			required = GPOINTER_TO_INT (args[4]);
 
 	double		cur_freq = nm_device_get_frequency (dev);
 	gboolean		assoc = nm_device_wireless_is_associated (dev);
Index: src/NetworkManagerUtils.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerUtils.c,v
retrieving revision 1.37
diff -u -r1.37 NetworkManagerUtils.c
--- src/NetworkManagerUtils.c	6 May 2005 21:20:42 -0000	1.37
+++ src/NetworkManagerUtils.c	9 Jun 2005 21:07:52 -0000
@@ -732,8 +732,8 @@
 {
 	gboolean *condition = (gboolean *)args[0];
 	char *message = (char *)args[1];
-	int log_level = (int)args[2];
-	int log_interval = (int)args[3];
+	int log_level = GPOINTER_TO_INT (args[2]);
+	int log_interval = GPOINTER_TO_INT (args[3]);
 
 	g_return_val_if_fail (condition != NULL, TRUE);
 
@@ -760,8 +760,8 @@
 {
 	nm_completion_boolean_function_1 condition = args[0];
 	char *message = args[1];
-	int log_level = (int)args[2];
-	int log_interval = (int)args[3];
+	int log_level = GPOINTER_TO_INT (args[2]);
+	int log_interval = GPOINTER_TO_INT (args[3]);
 	u_int64_t arg0;
 	
 	memcpy(&arg0, &args[4], sizeof (arg0));
@@ -783,8 +783,8 @@
 {
 	nm_completion_boolean_function_2 condition = args[0];
 	char *message = args[1];
-	int log_level = (int)args[2];
-	int log_interval = (int)args[3];
+	int log_level = GPOINTER_TO_INT (args[2]);
+	int log_interval = GPOINTER_TO_INT (args[3]);
 	u_int64_t arg0, arg1;
 
 	memcpy(&arg0, &args[4], sizeof (arg0));


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