]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[eepro] Avoid unused variable warning in gcc 4.6
authorMichael Brown <mcb30@ipxe.org>
Wed, 16 Mar 2011 19:51:02 +0000 (19:51 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 16 Mar 2011 19:51:02 +0000 (19:51 +0000)
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>
src/drivers/net/eepro.c

index 704d11a93c6b67d9367b064700f754a5f67e56ce..909482bccd300e800b58cf8af7193065b03c4083 100644 (file)
@@ -422,6 +422,7 @@ static void eepro_transmit(
                tx_available = tx_start - tx_end;
        else
                tx_available = XMT_RAM;
+       assert ( length <= tx_available );
        last = tx_end;
        end = last + (((length + 3) >> 1) << 1) + XMT_HEADER;
        if (end >= (XMT_UPPER_LIMIT << 8)) {