RFA: Fix compile time warnings building iq2000-tdep.c

Daniel Jacobowitz drow@false.org
Tue Nov 28 16:56:00 GMT 2006


On Tue, Nov 28, 2006 at 04:43:46PM +0000, Nick Clifton wrote:
> Hi Guys,
> 
>   The iq2000 port of GDB currently fails to build on the 6.6 branch
>   and mainline because of compile time warnings triggered in
>   iq2000-tdep.c, (which are now being treated as errors).  The
>   patch below fixes them by changing various void* variables into
>   gdb_byte*.
> 
>   May I apply the patch please ? 

Looks OK except...

> *************** iq2000_extract_return_value (struct type
> *** 558,564 ****
>        returned in a register, and if larger than 8 bytes, it is 
>        returned in a stack location which is pointed to by the same
>        register.  */
> !   CORE_ADDR return_buffer;
>     int len = TYPE_LENGTH (type);
>   
>     if (len <= (2 * 4))
> --- 558,564 ----
>        returned in a register, and if larger than 8 bytes, it is 
>        returned in a stack location which is pointed to by the same
>        register.  */
> !   gdb_byte return_buffer;
>     int len = TYPE_LENGTH (type);
>   
>     if (len <= (2 * 4))

That?  Aren't you going to run off the end of that if it's only a
single byte?

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Gdb-patches mailing list