This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [PATCH] sim: tweak signed to unsigned local vars


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

Attachment: signature.asc
Description: This is a digitally signed message part.


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