[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-devtools
Subject:    Re: HPUX-DEVTOOLS: pstat_getproc EOVERFLOW on HP-UX11.11
From:       Dennis Handly <dhandly () cup ! hp ! com>
Date:       2007-03-01 20:11:27
Message-ID: 200703012011.MAA26471 () hpcll183 ! hp ! com
[Download RAW message or body]

>From: Stan Sieler <sieler@allegro.com>
>   cc -w1 foo.c
      remark #2181-D: argument is incompatible with corresponding
                format string conversion
        printf("li  = %d\n", li);           // "long int li;"
          the above is annoying, because in the compilation in question, 
          "int" and "long int" are both 32 bits.

That's why 2181 is a remark in this case.  By default it only warns if
the size is different.  And signed diffs are remarks too.

>I'm surprised that both gcc and HP C incorrectly (IMHO) warned me about
>passing a "long int" to a %d ...

Don't ask for remarks.  ;-)

>neither warned me about passing a
>char, unsigned char, short, or an unsigned short to a %d, which is
>arguably worse :)
Stan Sieler

Except these are not char, unsigned char, short, or an unsigned short
since they are promoted to ints for "...".

 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE hpux-devtools
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic