david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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.
This commit is contained in:
Michael Brown 2008-09-29 01:00:14 +01:00
parent 50dc9344b7
commit 0015601f0b
1 changed files with 2 additions and 2 deletions

View File

@ -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 ) );