Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] Re: (PR#12020) compile warnings cleanup
Home

[Freeciv-Dev] Re: (PR#12020) compile warnings cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12020) compile warnings cleanup
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Jan 2005 18:26:20 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12020 >

Brett Albertson wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12020 >
> 
>>[jdorje - Fri Jan 28 00:15:40 2005]:
>>
>>I don't like using casts to avoid warnings.  The warnings are
>>(occasionally) there for a reason, and using the cast simply hides it
>>rather than fixing it.  Changing variable types is the better solution.
> 
> 
> There are a couple of casts, but most are changes in variable types. 
> For example:
> 
> -  unsigned char hostname[512];
> -  unsigned char port[256];
> -  unsigned char version[256];
> -  unsigned char players[256];
> -  unsigned char status[256];
> +  char hostname[512];
> +  char port[256];
> +  char version[256];
> +  char players[256];
> +  char status[256];

Yes.  I would take just those parts and leave the rest, but I don't know 
if that will break anything (though it works for me).

Will you make a patch that doesn't use casts but only fixes types?  Then 
we can look at the remaining problem places and figure out what the 
right fix is.

-jason





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