Re: warning - comparing a signed value to an unsinged value
From: Sheldon Simms (sheldonsimms_at_yahoo.com)
Date: 10/21/03
- Next message: Alex: "Re: free disk space"
- Previous message: Stephen M. Webb: "Re: C vs Perl"
- In reply to: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Next in thread: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Reply: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 21 Oct 2003 13:16:31 -0400
On Tue, 21 Oct 2003 06:40:26 +0000, Kevin Goodsell wrote:
> Changing the type is not an option. As I told pete, 'SomeFunc' is
> actually sscanf() with a %n format specifier.
>
> The value is non-negative, but the interface requires an int. This is
> beyond my control. If you want to file a defect report suggesting that
> the %n format specifier for the *scanf functions should expect a size_t
> instead of an int, be my guest. While you're at it, I believe there are
> a few other standard library functions that use ints where size_t would
> probably be more appropriate.
>
> Maybe I should have been more clear in my post. I intended for you to
> assume the types were dissimilar for some good reason and could not be
> easily changed to similar types.
>
> Yes, in your defect report be sure to include a note stating that Dennis
> Ritchie (or whoever defined it) is an idiot for defining *scanf() the
> way he did.
I feel I owe you an apology Kevin! It really was stupid of me to
attempt to answer your question by considering the different possibilites.
I should have realized right away that you are an expert. After all,
novices and inexperienced programmers hardly ever post anything in
comp.lang.c, and even if they did, I should have been able to recognize
your expertise by clairvoyantly reading your aura. I promise it will
never happen again. Please forgive me.
-Sheldon
- Next message: Alex: "Re: free disk space"
- Previous message: Stephen M. Webb: "Re: C vs Perl"
- In reply to: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Next in thread: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Reply: Kevin Goodsell: "Re: warning - comparing a signed value to an unsinged value"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|