Browse Source

[eepro] Avoid unused variable warning in gcc 4.6

From a cursory examination, it appears as though the calculation of
tx_available is redundant, since eepro_transmit() waits for transmit
completion before returning anyway.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
7f2903c623
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/drivers/net/eepro.c

+ 1
- 0
src/drivers/net/eepro.c View File

@@ -422,6 +422,7 @@ static void eepro_transmit(
422 422
 		tx_available = tx_start - tx_end;
423 423
 	else
424 424
 		tx_available = XMT_RAM;
425
+	assert ( length <= tx_available );
425 426
 	last = tx_end;
426 427
 	end = last + (((length + 3) >> 1) << 1) + XMT_HEADER;
427 428
 	if (end >= (XMT_UPPER_LIMIT << 8)) {

Loading…
Cancel
Save