Re: warning - comparing a signed value to an unsinged value

From: Sheldon Simms (sheldonsimms_at_yahoo.com)
Date: 10/21/03


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



Relevant Pages

  • Re: Possible to pass strings back to ASP from ActriveX?
    ... afx_msg int AboutBox; ... helpstring("AxTemplateTest1 ActiveX Control module"), ... // Primary dispatch interface for CAxTemplateTest1Ctrl ... helpstring("Dispatch interface for AxTemplateTest1 Control")] ...
    (microsoft.public.windowsce.embedded)
  • Re: Possible to pass strings back to ASP from ActriveX?
    ... afx_msg int AboutBox; ... helpstring("AxTemplateTest1 ActiveX Control module"), ... // Primary dispatch interface for CAxTemplateTest1Ctrl ... helpstring("Dispatch interface for AxTemplateTest1 Control")] ...
    (microsoft.public.windowsce.embedded)
  • Possible to pass strings back to ASP from ActriveX?
    ... Is it also possible to pass it back from ActiveX, ... afx_msg int AboutBox; ... helpstring("AxTemplateTest1 ActiveX Control module"), ... helpstring("Dispatch interface for AxTemplateTest1 Control")] ...
    (microsoft.public.windowsce.embedded)
  • Re: Possible to pass strings back to ASP from ActriveX?
    ... I'm not an MFC guy so I don't have any words of wisdom for walking ... afx_msg int AboutBox; ... helpstring("AxTemplateTest1 ActiveX Control module"), ... helpstring("Dispatch interface for AxTemplateTest1 Control")] ...
    (microsoft.public.windowsce.embedded)
  • RFC: if_clone overhaul
    ... Please test/review the following patch to the network interface cloneing ... static void ... -if_clone_lookup(const char *name, int *unitp) ... static int gifmodevent; ...
    (freebsd-net)