2.6.12-rc3 compile error in aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c: In function `ahc_linux_init':drivers/scsi/aic7xxx/aic7xxx_osm.c:3608: parse error before int' drivers/scsi/aic7xxx/aic7xxx_osm.c:3609: rc' undeclared (first use in this function) drivers/scsi/aic7xxx/aic7xxx_osm.c:3609: (Each undeclared identifier is reported only once drivers/scsi/aic7xxx/aic7xxx_osm.c:3609: for each function it appears in.) drivers/scsi/aic7xxx/aic7xxx_osm.c: At top level:drivers/scsi/aic7xxx/aic7xxx_osm.c:744: warning: `ahc_linux_detect' defined but not used
Quoted 9 lines · Martin J. Bligh
drivers/scsi/aic7xxx/aic7xxx_osm.c: In function `ahc_linux_init':drivers/scsi/aic7xxx/aic7xxx_osm.c:3608: parse error beforeint' drivers/scsi/aic7xxx/aic7xxx_osm.c:3609:rc' undeclared (first use in this function)drivers/scsi/aic7xxx/aic7xxx_osm.c:3609: (Each undeclared identifier is reported only oncedrivers/scsi/aic7xxx/aic7xxx_osm.c:3609: for each function it appears in.)drivers/scsi/aic7xxx/aic7xxx_osm.c: At top level:drivers/scsi/aic7xxx/aic7xxx_osm.c:744: warning: `ahc_linux_detect' defined but not used
Looks fixed in Linus' current tree:
--------------------------
commit 858eaca169ed5e7b1b14eebb889323e75a02af0e
tree 385e241e0cc18794b8d8b70095181e2578bee14c
parent a2755a80f40e5794ddc20e00f781af9d6320fafb
author James Bottomley <[email protected]> Thu, 21 Apr 2005 21:35:45 -0700 committer Linus Torvalds <[email protected]> Thu, 21 Apr 2005 21:35:45 -0700
[PATCH] Fix aic7xxx_osm.c compile with older gcc's
My version of gcc doesn't warn about this error (declaration in the middle of a set of statements).
The fix is simple (this also corrects return code; for init functions it should be zero or error).
--------------------------
Steven