From: Wolfgang Denk Date: Sat, 28 Mar 2009 19:16:16 +0000 (+0100) Subject: Fix implicit declaration of function 'eth_[gs]etenv_enetaddr' X-Git-Tag: v2009.06-rc1~125 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d2567be915036720693f3ddd00c39b5b4d86fb8d;p=u-boot Fix implicit declaration of function 'eth_[gs]etenv_enetaddr' ...and some other compile warnings. Signed-off-by: Wolfgang Denk --- diff --git a/board/pcs440ep/pcs440ep.c b/board/pcs440ep/pcs440ep.c index 27272142c1..9cc3f5b640 100644 --- a/board/pcs440ep/pcs440ep.c +++ b/board/pcs440ep/pcs440ep.c @@ -31,6 +31,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -186,8 +187,7 @@ static void load_ethaddr(void) { int ok_ethaddr, ok_eth1addr; int ret; - char buf[EEPROM_LEN]; - char mac[32]; + uchar buf[EEPROM_LEN]; char *use_eeprom; u16 checksumcrc16 = 0; @@ -200,14 +200,14 @@ static void load_ethaddr(void) /* read the MACs from EEprom */ status_led_set (0, STATUS_LED_ON); status_led_set (1, STATUS_LED_ON); - ret = eeprom_read (CONFIG_SYS_I2C_EEPROM_ADDR, 0, (uchar *)buf, EEPROM_LEN); + ret = eeprom_read (CONFIG_SYS_I2C_EEPROM_ADDR, 0, buf, EEPROM_LEN); if (ret == 0) { - checksumcrc16 = cyg_crc16 ((uchar *)buf, EEPROM_LEN - 2); + checksumcrc16 = cyg_crc16 (buf, EEPROM_LEN - 2); /* check, if the EEprom is programmed: * - The Prefix(Byte 0,1,2) is equal to "ATR" * - The checksum, stored in the last 2 Bytes, is correct */ - if ((strncmp (buf,"ATR",3) != 0) || + if ((strncmp ((char *)buf,"ATR",3) != 0) || ((checksumcrc16 >> 8) != buf[EEPROM_LEN - 2]) || ((checksumcrc16 & 0xff) != buf[EEPROM_LEN - 1])) { /* EEprom is not programmed */ diff --git a/board/sandburst/karef/karef.c b/board/sandburst/karef/karef.c index 1ad1ae2519..b8ae68fcd6 100644 --- a/board/sandburst/karef/karef.c +++ b/board/sandburst/karef/karef.c @@ -33,6 +33,10 @@ #include #include "../common/sb_common.h" #include "../common/ppc440gx_i2c.h" +#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) || \ + defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) +#include +#endif void fpga_init (void); diff --git a/board/sandburst/metrobox/metrobox.c b/board/sandburst/metrobox/metrobox.c index bd6be3d2aa..fc136c89c4 100644 --- a/board/sandburst/metrobox/metrobox.c +++ b/board/sandburst/metrobox/metrobox.c @@ -32,6 +32,10 @@ #include #include "../common/ppc440gx_i2c.h" #include "../common/sb_common.h" +#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) || \ + defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3) +#include +#endif void fpga_init (void); diff --git a/board/xpedite1k/xpedite1k.c b/board/xpedite1k/xpedite1k.c index 92dc6280d2..044aeb956d 100644 --- a/board/xpedite1k/xpedite1k.c +++ b/board/xpedite1k/xpedite1k.c @@ -25,6 +25,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/common/lynxkdi.c b/common/lynxkdi.c index 17b0607ae0..b23135bd75 100644 --- a/common/lynxkdi.c +++ b/common/lynxkdi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include