From c819ffee91336da1134357596a6b7b58ab050f53 Mon Sep 17 00:00:00 2001 From: proski Date: Sun, 10 Sep 2006 07:26:10 +0000 Subject: [PATCH] * netboot/natsemi.c: Fix compile error with gcc 4.1.1. Cast cannot make a variable volatile - it should be declared as such. * netboot/sis900.c: Likewise. --- ChangeLog | 6 ++++++ netboot/natsemi.c | 4 ++-- netboot/sis900.c | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e54612854..9af4b23a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-10 Pavel Roskin + + * netboot/natsemi.c: Fix compile error with gcc 4.1.1. Cast + cannot make a variable volatile - it should be declared as such. + * netboot/sis900.c: Likewise. + 2006-09-08 Pavel Roskin * netboot/etherboot.h: Remove incorrect extern declarations of diff --git a/netboot/natsemi.c b/netboot/natsemi.c index 56ff42dc4..5a164185a 100644 --- a/netboot/natsemi.c +++ b/netboot/natsemi.c @@ -608,7 +608,7 @@ natsemi_transmit(struct nic *nic, const char *p) /* Packet */ { u32 status, to, nstype; - u32 tx_status; + volatile u32 tx_status; /* Stop the transmitter */ outl(TxOff, ioaddr + ChipCmd); @@ -647,7 +647,7 @@ natsemi_transmit(struct nic *nic, to = currticks() + TX_TIMEOUT; - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) /* wait */ ; if (currticks() >= to) { diff --git a/netboot/sis900.c b/netboot/sis900.c index 6208a26a4..44980d856 100644 --- a/netboot/sis900.c +++ b/netboot/sis900.c @@ -901,7 +901,7 @@ sis900_transmit(struct nic *nic, const char *p) /* Packet */ { u32 status, to, nstype; - u32 tx_status; + volatile u32 tx_status; /* Stop the transmitter */ outl(TxDIS, ioaddr + cr); @@ -940,7 +940,7 @@ sis900_transmit(struct nic *nic, to = currticks() + TX_TIMEOUT; - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) /* wait */ ; if (currticks() >= to) {