Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2000:
[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
Home

[Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Argiolas Nicola" <argiolas@xxxxxxxxxxxxxx>, "Gaute B Strokkenes" <gs234@xxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: OSF1 V4.0D 878 alpha port
From: "SamBC" <sambc@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Oct 2000 11:03:01 +0100

----- Original Message -----
From: "Gaute B Strokkenes" <gs234@xxxxxxxxx>


>
> >         But in this case (the xpm cursors and the icons) the problem
> > is another: XCreateBitmapFromData wants a char (i.e. in gcc a signed
> > char) string in the 'data' field but the datas passed are
> > unsigned. GCC make a casting without any warning (I've also tested
> > this): I suppose because gcc doesn't change anything in the
> > conversion. In this case is better IMHO to declare the cursors
> > directly char (again, in gcc signed char), and again the code
> > becomes more portable.
>
> I'm not sure I see what could go wrong here.  But then again, I know
> next to nothing about X.

If I understand it correctly, char is being used here to represent 1 byte of
binary data (as it so often is) rather than a number or a character. In this
case, signed/unsigned does not matter, as that is used only when using the
data as an integer, which isn't happening here (IIRC). So as long as the
compiler only casts rather than converts the unsigned char to signed char,
or vice-versa, there is no problem whatsoever.


SamBC




[Prev in Thread] Current Thread [Next in Thread]