This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Removing compile warnings.
- From: David Fernandez <dfernandez at cct dot co dot uk>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Thu, 23 Nov 2006 16:37:34 +0000
- Subject: Removing compile warnings.
- Organization: Concurrent Technologies, Plc
- Reply-to: dfernandez at cct dot co dot uk
Hi,
This remove compile warnings in if_82559.c
Have fun.
David.
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/dfernandez/Projects/ecos/packages/devs/eth/intel/i82559/current/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -5 -b -B -w -r1.1.1.1 ChangeLog
--- ChangeLog 2006/06/26 10:52:46 1.1.1.1
+++ ChangeLog 2006/11/23 16:28:13
@@ -1,5 +1,9 @@
+2006-11-23 David Fernandez <dfernandez@cct.co.uk>
+
+ * src/if_i82559.c Modifications to remove compile warnings.
+
2005-01-22 Andrew Lunn <andrew.lunn@ascom.ch>
* src/if_i82559.c Added string.h to remove compiler warnings.
2004-08-12 Jani Monoses <jani@iv.ro>
Index: src/if_i82559.c
===================================================================
RCS file: /home/cvs/cvsroot/dfernandez/Projects/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c,v
retrieving revision 1.1.1.1
diff -u -5 -b -B -w -r1.1.1.1 if_i82559.c
--- src/if_i82559.c 2006/06/26 10:52:46 1.1.1.1
+++ src/if_i82559.c 2006/11/23 16:28:13
@@ -207,11 +207,11 @@
#define END_CONSOLE() \
CYGACC_CALL_IF_SET_CONSOLE_COMM(_cur_console); \
} /* END BLOCK */
-void CheckRxRing(struct i82559* p_i82559, char * func, int line);
+void CheckRxRing(struct i82559* p_i82559, const char * func, int line);
// ------------------------------------------------------------------------
// Check on the environment.
//
// These are not CDL type config points; they are set up for your platform
@@ -898,19 +898,23 @@
static int pci_init_find_82559s(void);
static void i82559_reset(struct i82559* p_i82559);
static void i82559_restart(struct i82559 *p_i82559);
-static int eth_set_mac_address(struct i82559* p_i82559, char *addr, int eeprom );
+static int eth_set_mac_address(struct i82559* p_i82559, cyg_uint8 *addr, int eeprom );
static void InitRxRing(struct i82559* p_i82559);
static void ResetRxRing(struct i82559* p_i82559);
static void InitTxRing(struct i82559* p_i82559);
static void ResetTxRing(struct i82559* p_i82559);
+#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) \
+|| (defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) && \
+ !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE) )
static void
eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);
+#endif
static cyg_uint32
eth_isr(cyg_vector_t vector, cyg_addrword_t data);
static int i82559_configure(struct i82559* p_i82559, int promisc,
int oversized, int multicast_all);
@@ -1323,11 +1327,11 @@
return retval;
}
static int
-read_eeprom_esa(struct i82559 *p_i82559, char *addr)
+read_eeprom_esa(struct i82559 *p_i82559, cyg_uint8 *addr)
{
int addr_length, i, count;
cyg_uint16 checksum;
cyg_uint32 ioaddr = p_i82559->io_address;
@@ -1901,11 +1905,11 @@
//
// Function : CheckRxRing
//
// ------------------------------------------------------------------------
void
-CheckRxRing(struct i82559* p_i82559, char * func, int line)
+CheckRxRing(struct i82559* p_i82559, const char * func, int line)
{
RFD *p_rfd;
int i;
RFD *p_rfd2;
cyg_uint32 link;
@@ -2707,10 +2711,14 @@
}
#endif
// ------------------------------------------------------------------------
+#if defined(CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT) \
+|| (defined(CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT) && \
+ !defined(CYGPKG_IO_ETH_DRIVERS_STAND_ALONE) )
+
static void
eth_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
{
// This conditioning out is necessary because of explicit calls to this
// DSR - which would not ever be called in the case of a polled mode
@@ -2727,10 +2735,11 @@
# ifndef CYGPKG_REDBOOT
# error Empty i82559 ethernet DSR is compiled. Is this what you want?
# endif
#endif
}
+#endif
// ------------------------------------------------------------------------
// Deliver routine:
#if defined( CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT ) || \
defined( CYGHWR_DEVS_ETH_INTEL_I82559_DEMUX_ALL )
@@ -3371,11 +3380,11 @@
//
// Return : 0 = It worked.
// non0 = It failed.
// ------------------------------------------------------------------------
static int
-eth_set_mac_address(struct i82559* p_i82559, char *addr, int eeprom)
+eth_set_mac_address(struct i82559* p_i82559, cyg_uint8 *addr, int eeprom)
{
cyg_uint32 ioaddr;
cyg_uint16 status;
volatile CFG *ccs;
volatile cyg_uint8* config_bytes;