Use GINT_TO_POINTER casts to remove compiler warnings.
authorFederico Mena Quintero <federico@nuclecu.unam.mx>
Thu, 18 Jun 1998 20:37:11 +0000 (20:37 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Thu, 18 Jun 1998 20:37:11 +0000 (20:37 +0000)
1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>

* testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
warnings.

* grel.c: #include <string.h>

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/grel.c
grel.c
testglib.c
tests/testglib.c

index 81e4caa..a3f4974 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 81e4caa..a3f4974 100644 (file)
@@ -1,3 +1,10 @@
+1998-06-18  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * testglib.c (main): Use GINT_TO_POINTER casts to remove compiler
+       warnings.
+
+       * grel.c: #include <string.h>
+
 Fri Jun 12 15:39:06 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h (GScanner): cleanups of the structure fields (binary
index 91d2b68..e4c1f6e 100644 (file)
@@ -17,6 +17,7 @@
  */
 #include "glib.h"
 #include <stdarg.h>
+#include <string.h>
 
 typedef struct _GRealRelation      GRealRelation;
 typedef struct _GRealTuples        GRealTuples;
diff --git a/grel.c b/grel.c
index 91d2b68..e4c1f6e 100644 (file)
--- a/grel.c
+++ b/grel.c
@@ -17,6 +17,7 @@
  */
 #include "glib.h"
 #include <stdarg.h>
+#include <string.h>
 
 typedef struct _GRealRelation      GRealRelation;
 typedef struct _GRealTuples        GRealTuples;
index 45d58dc..818e49d 100644 (file)
@@ -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);
 
index 45d58dc..818e49d 100644 (file)
@@ -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);