curl-library
Re: examples compiler warnings
Date: Fri, 23 Sep 2011 14:35:15 +0100
Right. I suppose there is also the question of how may compile the
samples rather than use them for cut'n'paste, and of those, how many
compile -Wall without knowing what it is they are going to see.
On 23 September 2011 13:07, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 23 Sep 2011, John P. Hartmann wrote:
>
>> However, if I were to look at such a doctored sample as a sample of doing
>> a particular library function, this macro would get in the way and might
>> make me conclude that this library isn't quite what I am looking for.
>
> That's kind of what I'm thinking as well. The examples need to remain simple
> and the focus needs to be on the libcurl API. We should not bend over
> backwards only to fix compiler warnings in irrelevant code sections.
>
> In fact, that's also why we don't do proper error checking etc in most of
> the examples, even though of course we of course encourage all users to do
> that in real life.
>
>> It might even be possible to have a generic set of samples from which one
>> can mechanically generate samples that cope with the idiosyncrasies of the
>> various platforms. (E.g., generate the appropriate %l or %d from %zd.)
>
> I've toyed with that idea as well in my head, but it would force us to
> introduce a new format to write the examples in to generate the example
> source code from (and then still risk that a fair share of users will end up
> always looking at the wrong version of the examples). Right now I don't
> think a bunch of warnings is reason enough to make us cross that bridge.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-23