Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#8149) generate_packets.py can't handle string arra
Home

[Freeciv-Dev] Re: (PR#8149) generate_packets.py can't handle string arra

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8149) generate_packets.py can't handle string arrays
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 17 Mar 2004 12:59:02 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8149 >

On Wed, Mar 17, 2004 at 07:37:25AM -0800, Mike Kaufman wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8149 >
> 
> On Tue, Mar 16, 2004 at 01:49:04PM -0800, Jason Short wrote:
> >
> > I get a compilation error:
> >
> > packets_gen.c: In function `dsend_packet_options_settable_control':
> > packets_gen.c:24985: warning: passing arg 1 of `mystrlcpy' from
> > incompatible pointer type
> > packets_gen.c: In function `dlsend_packet_options_settable_control':
> > packets_gen.c:24996: warning: passing arg 1 of `mystrlcpy' from
> > incompatible pointer type
> 
> this is a bug in generate_packets.py. This happens because it does not
> handle arrays of strings correctly. You only see it here because the packet
> was small enough to have the script generate a dsend packet. add a dsend
> flag to PACKET_NATION_RULESET and you will see the same thing.

Yes it is an bug.

> A workaround (that will fix the warning but not the problem) is to not 
> generate dsend packets unless explicitly asked to. This would be good 
> simply to cut down the amount of unused code in packets_gen.c

I agree for the second reason: reducing the code size.

I have no idea when I will have time to make a patch however.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "Debugging is twice as hard as writing the code in the first place.
   Therefore, if you write the code as cleverly as possible, you are,
   by definition, not smart enough to debug it."
    -- Brian W. Kernighan




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