cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PATCH/RFC: Add option to compile with -Werror, fix build on 64-bit Linux.

From: Ben Greear <greearb_at_candelatech.com>
Date: Sat, 27 Mar 2010 20:24:13 -0700

On 03/27/2010 11:15 AM, Daniel Stenberg wrote:
> On Fri, 26 Mar 2010, Ben Greear wrote:
>
>> It also fixes all compile warnings on 64-bit Fedora 11 Linux, compiles
>> clean on 32-bit FC8 as well.
>
> Thanks for your help with this, we certainly want to make all compiler
> warnings disappear.
>
> I'm very curious to first get to see the warnings. We run autobuilds
> non-stop, and while I don't think we have any Fedora machines in the mix
> right now we don't have many warnings on Linux machines with gcc.
> Clearly you've found a whole bunch more than the ones we've seen at:
>
> http://curl.haxx.se/auto/
>
> (the situation is a bit unclear right now since we're in the transition
> of moving them all over to git)
>
> Is there any chance you could help us out by running autobuilds for a
> while on your machine (or a similar setup)?

My system is standard Fedora 11, 64-bit. The main issue seems to be that
ssh libs want unsigned int length args, and strlen is returning size_t.

I'll see about setting up an auto-build.

>> The ssh changes are the most risky and in need of review, and may have
>> issues on other platforms and/or version of libssh.
>
> I'm not happy with the mixed changes in the patch.
>
> You include changes for the telnet patch you've submitted but we haven't
> dealt with on the master branch, and you change which libssh2 functions
> are used. While I don't disagree with the changing of the libssh2 calls
> from their macros to the actual functions, I would prefer to have that
> change done in a separate patch/commit.
>
> I also think a few of the typecasts you did could rather be fixed by
> changing the prototypes to avoid the typecast. Examples: the 'err'
> variable in lib/ssh.c should rather be an unsigned long instead of an
> int and Curl_smtp_escape_eob() could be made to use a ssize_t variable
> as its second argument.

I'll break this into smaller patches and see if I can get rid of some of
the type-casts as you mention.

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-28