[Freeciv-Dev] PATCH: gint/gpointer casting in GTK+ client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
There are a lot of places in the GTK+ client where integer values
are cast to and from pointer values. This causes no problems on (for
example) an i386 Linux box, since sizeof(gint)=sizeof(gpointer). However,
this is not the case on my Alpha box. The GLib guys have already allowed
for this, however, and have provided GINT_TO_POINTER and GPOINTER_TO_INT
macros for supposedly "safe" casts. The attached patch replaces the
existing casts with the GLib macros, removing a LOT of redundant warnings
when compiling on an Alpha.
The patch touches little code, so I don't see any reasonable
reason why it shouldn't be committed. Complaints?
Ben
--
ben@xxxxxxxxxxxxxxxxxxxxxx http://bellatrix.pcl.ox.ac.uk/~ben/
"Verbosity leads to unclear, inarticulate things."
- Vice President Dan Quayle, 11/30/88
gintpointer.patch.gz
Description: GNU Zip compressed data
- [Freeciv-Dev] PATCH: gint/gpointer casting in GTK+ client,
Ben Webb <=
|
|