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: [committed] Remove a redundant condition check in tic6x-linux-tdep.c


> From: Yao Qi <yao@codesourcery.com>
> Date: Fri, 30 Nov 2012 15:35:22 +0800
> 
> Hi,
> When gdb is configured as target=tic6x-uclinux, and compiled with clang,
> I get this warning:
> 
> gdb/tic6x-linux-tdep.c:66:19: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare]
> 
> It is redundant to check 'REGNUM >= 0' as it is unsigned.  The
> following patch is to fix it.  Committed.

Hmm, well, perhaps the regnum variable should just be made signed.
That's typically what we use for register numbers, since -1 has the
special meaning of "all registers"/


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