Hello!
I am using ixgbe-2.0.34.3, kernel 2.4.36, glibc-2.2.5 and gcc 2.96.
When I build ixgbe I get the following error:
ixgbe_param.c: In function `ixgbe_check_options':
ixgbe_param.c:950: parse error before `char'
ixgbe_param.c:956: `pstring' undeclared (first use in this function)
ixgbe_param.c:956: (Each undeclared identifier is reported only once
ixgbe_param.c:956: for each function it appears in.)
This seems to come from the "char" declaration in line 950 which is not always
at the top of the function (depending on module_param_array) and this therefore
does not conform to C style coding. (In C++ this would be okay.)
Here is the code leading to the error:
---
#ifdef module_param_array
if (num_FdirPballoc > bd) {
#endif
char pstring[10]; \\ <--- this is the declaration
fdir_pballoc_mode = FdirPballoc[bd];
ixgbe_validate_option(&fdir_pballoc_mode, &opt);
---
Following patch corrects the error by moving the declaration to the top.
---
--- linux-2.4.36/drivers/net/ixgbe/ixgbe_param.c2009-06-15
15:10:51.319300655 +0200
+++ linux-2.4.36-patched/drivers/net/ixgbe/ixgbe_param.c2009-06-15
15:13:18.656067121 +0200
@@ -939,6 +939,7 @@
.arg = {.r = {.min = IXGBE_FDIR_PBALLOC_64K,
.max = IXGBE_FDIR_PBALLOC_256K}}
};
+ char pstring[10];
if ((adapter->hw.mac.type == ixgbe_mac_82598EB) ||
(!(*aflags & (IXGBE_FLAG_FDIR_HASH_CAPABLE |
@@ -947,7 +948,6 @@
#ifdef module_param_array
if (num_FdirPballoc > bd) {
#endif
- char pstring[10];
fdir_pballoc_mode = FdirPballoc[bd];
ixgbe_validate_option(&fdir_pballoc_mode, &opt);
switch (fdir_pballoc_mode) {
---
Thanks,
Frank
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel