This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printf("%d,%ld",a,b); always prints unsigned


On Fri, 2003-05-16 at 15:52, Bob Holmberg wrote:
> Gary,
> 
> == The program:
> 
> #include <cyg/infra/diag.h>
> 
> int
> main(void)
> {
>   int  a = -1;
>   long b = -1;
>   diag_printf("Should show -1 --> %d, %ld\n",a,b);
> }
> 
> == gives the results:
> Should show -1 --> -1,-1
> ==
> 
> It's different than when I use printf.
> I guess that's a work-around for now.
> 

It also points where to look, since those functions are quite
separate.

-- 
Gary D. Thomas <gary.thomas@mind.be>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]