diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 16:45:02 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-13 16:45:02 +0200 |
commit | 77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (patch) | |
tree | e9563b2f28ea59062b90bb5712f141e8e9798aee /net | |
parent | 17a8b276ba2b3499b75cd60b0b5289dbbea7967b (diff) | |
download | u-boot-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.zip u-boot-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.gz u-boot-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.bz2 |
Cleanup for GCC-4.x
Diffstat (limited to 'net')
-rw-r--r-- | net/bootp.c | 18 | ||||
-rw-r--r-- | net/eth.c | 2 | ||||
-rw-r--r-- | net/net.c | 7 | ||||
-rw-r--r-- | net/tftp.c | 2 |
4 files changed, 16 insertions, 13 deletions
diff --git a/net/bootp.c b/net/bootp.c index b907351..8c56c08 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -330,7 +330,7 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) /* Retrieve extended information (we must parse the vendor area) */ if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) - BootpVendorProcess(&bp->bp_vend[4], len); + BootpVendorProcess((uchar *)&bp->bp_vend[4], len); NetSetTimeout(0, (thand_f *)0); @@ -387,7 +387,7 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R u8 *x; #endif #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME) - uchar *hostname; + char *hostname; #endif *e++ = 99; /* RFC1048 Magic Cookie */ @@ -578,7 +578,7 @@ BootpRequest (void) unsigned char bi_enetaddr[6]; int reg; char *e,*s; - uchar tmp[64]; + char tmp[64]; ulong tst1, tst2, sum, m_mask, m_value = 0; if (BootpTry ==0) { @@ -679,9 +679,9 @@ BootpRequest (void) /* Request additional information from the BOOTP/DHCP server */ #if (CONFIG_COMMANDS & CFG_CMD_DHCP) - ext_len = DhcpExtended(bp->bp_vend, DHCP_DISCOVER, 0, 0); + ext_len = DhcpExtended((u8 *)bp->bp_vend, DHCP_DISCOVER, 0, 0); #else - ext_len = BootpExtended(bp->bp_vend); + ext_len = BootpExtended((u8 *)bp->bp_vend); #endif /* CFG_CMD_DHCP */ /* @@ -836,7 +836,7 @@ static void DhcpSendRequestPkt(Bootp_t *bp_offer) * Copy options from OFFER packet if present */ NetCopyIP(&OfferedIP, &bp->bp_yiaddr); - extlen = DhcpExtended(bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP); + extlen = DhcpExtended((u8 *)bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP); pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + extlen; iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen; @@ -882,7 +882,7 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) dhcp_state = REQUESTING; if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) - DhcpOptionsProcess(&bp->bp_vend[4]); + DhcpOptionsProcess((u8 *)&bp->bp_vend[4]); BootpCopyNetParams(bp); /* Store net params from reply */ @@ -897,11 +897,11 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len) case REQUESTING: debug ("DHCP State: REQUESTING\n"); - if ( DhcpMessageType(bp->bp_vend) == DHCP_ACK ) { + if ( DhcpMessageType((u8 *)bp->bp_vend) == DHCP_ACK ) { char *s; if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC)) - DhcpOptionsProcess(&bp->bp_vend[4]); + DhcpOptionsProcess((u8 *)&bp->bp_vend[4]); BootpCopyNetParams(bp); /* Store net params from reply */ dhcp_state = BOUND; puts ("DHCP client bound to address "); @@ -109,7 +109,7 @@ int eth_register(struct eth_device* dev) int eth_initialize(bd_t *bis) { - unsigned char enetvar[32], env_enetaddr[6]; + char enetvar[32], env_enetaddr[6]; int i, eth_number = 0; char *tmp, *end; @@ -810,6 +810,7 @@ static ushort CDP_compute_csum(const uchar *buff, ushort len) int odd; ulong result = 0; ushort leftover; + ushort *p; if (len > 0) { odd = 1 & (ulong)buff; @@ -819,7 +820,9 @@ static ushort CDP_compute_csum(const uchar *buff, ushort len) buff++; } while (len > 1) { - result += *((const ushort *)buff)++; + p = (ushort *)buff; + result += *p++; + buff = (uchar *)p; if (result & 0x80000000) result = (result & 0xFFFF) + (result >> 16); len -= 2; @@ -1655,7 +1658,7 @@ NetSetIP(volatile uchar * xip, IPaddr_t dest, int dport, int sport, int len) ip->ip_sum = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2); } -void copy_filename (uchar *dst, uchar *src, int size) +void copy_filename (char *dst, char *src, int size) { if (*src && (*src == '"')) { ++src; @@ -78,7 +78,7 @@ store_block (unsigned block, uchar * src, unsigned len) } if (rc) { /* Flash is destination for this packet */ - rc = flash_write ((uchar *)src, (ulong)(load_addr+offset), len); + rc = flash_write ((char *)src, (ulong)(load_addr+offset), len); if (rc) { flash_perror (rc); NetState = NETLOOP_FAIL; |