se typecast 'size_t' on 'reg', not only avoid the related warning, but
authorMichael Eager <eager@eagercon.com>
Thu, 24 Jul 2014 02:21:42 +0000 (19:21 -0700)
committerMichael Eager <eager@eagercon.com>
Thu, 24 Jul 2014 02:21:42 +0000 (19:21 -0700)
commita52b4d3e268c10b84a48572db632d5011018e3ef
tree599c6bbcde24b361ec71b7701b197a8ecd79b1ad
parent11961ad8055910ed653d1d4ed0a20efeeb9ae717
se typecast 'size_t' on 'reg', not only avoid the related warning, but
also check whether less than zero -- for 'reg' is type 'int', and sizeof
(dwarf2_to_reg_map) is less than 0x7fff.

It is quoted in gdb_assert(), so need check 'reg' whether less than zero.
And the related warning (with '-W'):

  ../../binutils-gdb/gdb/microblaze-tdep.c:667:3: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

ChangeLog:

 * microblaze-tdep.c (microblaze_dwarf2_reg_to_regnum): Check whether
 less tha zero in conditional expression.
gdb/ChangeLog
gdb/microblaze-tdep.c