mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Use GINT_TO_POINTER casts to remove compiler warnings.
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>
This commit is contained in:
committed by
Arturo Espinosa
parent
860af205b6
commit
05b2f03c6a
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user