[PATCH] sim: tweak signed to unsigned local vars

Mike Frysinger vapier@gentoo.org
Mon Apr 12 18:45:00 GMT 2010


On Monday 12 April 2010 11:24:13 Joel Brobecker wrote:
> > @@ -583,7 +583,7 @@ hw_add_range_array_property (struct hw *me,
> > 
> >  			   * sizeof (unsigned_cell));
> >    
> >    unsigned_cell *cells = hw_zalloc (me, sizeof_cells);
> >    unsigned_cell *cell;
> > 
> > -  int i;
> > +  unsigned i;
> 
> I am not sure about this one either. Can you try changing the type
> of parameter nr_ranges to int? It looks like the only usage of this
> function is in hw-tree, and the variable used is actually an int...

the relevant funcs involved here seem like they should all be converted to 
unsigned.  in the event of an error, they abort, and only ever return unsigned 
values.  i'll go that route.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100412/834cf0e9/attachment.sig>


More information about the Gdb-patches mailing list