diff options
author | Michael Brown <mcb30@etherboot.org> | 2008-09-29 01:00:14 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-09-29 01:00:14 +0100 |
commit | 0015601f0b5c0d677450c1dc507a261d5ca3012d (patch) | |
tree | 3f39eebbc709a93773a1d373b743bbb1e2539e21 | |
parent | 50dc9344b7265915f5b9b1f795d024e775e3ae49 (diff) | |
download | ipxe-0015601f0b5c0d677450c1dc507a261d5ca3012d.tar.gz |
[gdb] Fix a compiler warning that shows up only when assertions are enabled
gcc should (I think) be warning about this anyway, but seems to do so
only when assertions are enabled for this object.
-rw-r--r-- | src/arch/i386/core/gdbmach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/i386/core/gdbmach.c b/src/arch/i386/core/gdbmach.c index 26fab609e..5e72e4d08 100644 --- a/src/arch/i386/core/gdbmach.c +++ b/src/arch/i386/core/gdbmach.c @@ -60,10 +60,10 @@ static struct hwbp *gdbmach_find_hwbp ( int type, unsigned long addr, size_t len } static void gdbmach_commit_hwbp ( struct hwbp *bp ) { - int regnum = bp - hwbps; + unsigned int regnum = bp - hwbps; /* Set breakpoint address */ - assert ( regnum >= 0 && regnum < sizeof hwbps / sizeof hwbps [ 0 ] ); + assert ( regnum < ( sizeof hwbps / sizeof hwbps [ 0 ] ) ); switch ( regnum ) { case 0: __asm__ __volatile__ ( "movl %0, %%dr0\n" : : "r" ( bp->addr ) ); |