From 05b2f03c6ab0523829c300881bcc164c30c4e8fa Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 18 Jun 1998 20:37:11 +0000 Subject: [PATCH] Use GINT_TO_POINTER casts to remove compiler warnings. 1998-06-18 Federico Mena Quintero * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler warnings. * grel.c: #include --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-12 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ glib/grel.c | 1 + grel.c | 1 + testglib.c | 6 +++--- tests/testglib.c | 6 +++--- 12 files changed, 64 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81e4caa..a3f4974 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 81e4caa..a3f4974 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +1998-06-18 Federico Mena Quintero + + * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler + warnings. + + * grel.c: #include + Fri Jun 12 15:39:06 1998 Tim Janik * glib.h (GScanner): cleanups of the structure fields (binary diff --git a/glib/grel.c b/glib/grel.c index 91d2b68..e4c1f6e 100644 --- a/glib/grel.c +++ b/glib/grel.c @@ -17,6 +17,7 @@ */ #include "glib.h" #include +#include typedef struct _GRealRelation GRealRelation; typedef struct _GRealTuples GRealTuples; diff --git a/grel.c b/grel.c index 91d2b68..e4c1f6e 100644 --- a/grel.c +++ b/grel.c @@ -17,6 +17,7 @@ */ #include "glib.h" #include +#include typedef struct _GRealRelation GRealRelation; typedef struct _GRealTuples GRealTuples; diff --git a/testglib.c b/testglib.c index 45d58dc..818e49d 100644 --- a/testglib.c +++ b/testglib.c @@ -477,11 +477,11 @@ main (int argc, gparray = g_ptr_array_new (); for (i = 0; i < 10000; i++) - g_ptr_array_add (gparray, (void*)i); + g_ptr_array_add (gparray, GINT_TO_POINTER (i)); for (i = 0; i < 10000; i++) - if (g_ptr_array_index (gparray, i) != (void*)i) - g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), (void*)i); + if (g_ptr_array_index (gparray, i) != GINT_TO_POINTER (i)) + g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i)); g_ptr_array_free (gparray, TRUE); diff --git a/tests/testglib.c b/tests/testglib.c index 45d58dc..818e49d 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -477,11 +477,11 @@ main (int argc, gparray = g_ptr_array_new (); for (i = 0; i < 10000; i++) - g_ptr_array_add (gparray, (void*)i); + g_ptr_array_add (gparray, GINT_TO_POINTER (i)); for (i = 0; i < 10000; i++) - if (g_ptr_array_index (gparray, i) != (void*)i) - g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), (void*)i); + if (g_ptr_array_index (gparray, i) != GINT_TO_POINTER (i)) + g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i)); g_ptr_array_free (gparray, TRUE); -- 2.7.4