avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Fix warnings patch


From: E. Weddington
Subject: Re: [avrdude-dev] Fix warnings patch
Date: Thu, 28 Aug 2003 14:57:46 -0600

On 28 Aug 2003 at 13:53, Theodore A. Roth wrote:

> 
> 
> On Thu, 28 Aug 2003, E. Weddington wrote:
> 
> > Hello all,
> >
> > Attached is a patch that should fix the remaining warnings in building the
> > code. It should also not introduce any changes to functionality.
> >
> > I thought I'd post this in case anyone wants to give it a look over or a
> > good run through before I commit. Thanks.
> 
> I don't think casting size and vsize to int is the right thing to do.
> Why not just change %d to %ld in the format specifier?
> 
> Ted

Both size and vsize are assigned their values from rc which is defined as 
an int in that function, do_op().

Perhaps the better thing to do would have been to change the type of size 
and vsize from long to int, but I didn't want to second guess what the 
intended use of these variables are for. Typecasting seemed safer.

Hold on.... Am I getting bit by machine sizes again? I'm assuming that int 
= 2 bytes. Is int = 4 bytes on Linux (etc.)?

I've no problem changing the format spec to %ld if that's the better thing 
to do.

Thanks for reviewing this. These are the warnings that require a little 
more care in fixing.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]