mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01: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:
parent
860af205b6
commit
05b2f03c6a
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -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>
|
Fri Jun 12 15:39:06 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* glib.h (GScanner): cleanups of the structure fields (binary
|
* glib.h (GScanner): cleanups of the structure fields (binary
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct _GRealRelation GRealRelation;
|
typedef struct _GRealRelation GRealRelation;
|
||||||
typedef struct _GRealTuples GRealTuples;
|
typedef struct _GRealTuples GRealTuples;
|
||||||
|
1
grel.c
1
grel.c
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct _GRealRelation GRealRelation;
|
typedef struct _GRealRelation GRealRelation;
|
||||||
typedef struct _GRealTuples GRealTuples;
|
typedef struct _GRealTuples GRealTuples;
|
||||||
|
@ -477,11 +477,11 @@ main (int argc,
|
|||||||
|
|
||||||
gparray = g_ptr_array_new ();
|
gparray = g_ptr_array_new ();
|
||||||
for (i = 0; i < 10000; i++)
|
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++)
|
for (i = 0; i < 10000; i++)
|
||||||
if (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), (void*)i);
|
g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i));
|
||||||
|
|
||||||
g_ptr_array_free (gparray, TRUE);
|
g_ptr_array_free (gparray, TRUE);
|
||||||
|
|
||||||
|
@ -477,11 +477,11 @@ main (int argc,
|
|||||||
|
|
||||||
gparray = g_ptr_array_new ();
|
gparray = g_ptr_array_new ();
|
||||||
for (i = 0; i < 10000; i++)
|
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++)
|
for (i = 0; i < 10000; i++)
|
||||||
if (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), (void*)i);
|
g_print ("array fails: %p ( %p )\n", g_ptr_array_index (gparray, i), GINT_TO_POINTER (i));
|
||||||
|
|
||||||
g_ptr_array_free (gparray, TRUE);
|
g_ptr_array_free (gparray, TRUE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user