hmm, no offsetof macro in mingw's c lib? or maybe the correct header
is not included on mingw build (usually stddef.h)?

if you cant find it, you could try adding this to sanei-scsi.h

#define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER))

just to see if that works.

allan

On 6/5/07, Hugh McMaster <dasjournal at gmail.com> wrote:
> Hi Allan,
>
> On 04/06/07, m. allan noah wrote:
> > platform/compiler/clibrary version info?
>
> Platform: MinGW (from Cygwin)
> Compiler: GCC 3.4.4
>
> I'm not sure what you mean by C library version.
>
> Hugh
>
> > On 6/4/07, Hugh McMaster wrote:
> > > Hi everyone,
> > >
> > > I am trying to compile Sane, and everything is working, until the
> > > compiler exits during the 'make' process with:
> > >
> > > sanei_scsi.c: In function `sanei_scsi_open':
> > > sanei_scsi.c:1220: warning: assignment makes integer from pointer without 
> > > a cast
> > > sanei_scsi.c:1222: warning: comparison between pointer and integer
> > > sanei_scsi.c:855: warning: unused variable `real_dev'
> > > sanei_scsi.c: In function `sanei_scsi_close':
> > > sanei_scsi.c:1572: warning: passing arg 1 of `CloseHandle' makes
> > > pointer from integer without a cast
> > > sanei_scsi.c: In function `sanei_scsi_cmd2':
> > > sanei_scsi.c:4755: warning: assignment discards qualifiers from
> > > pointer target type
> > > sanei_scsi.c:4763: warning: implicit declaration of function `offsetof'
> > > sanei_scsi.c:4763: error: parse error before "struct"
> > > sanei_scsi.c:4770: warning: passing arg 1 of `DeviceIoControl' makes
> > > pointer from integer without a cast
> > > sanei_scsi.c: At top level:
> > > sanei_scsi.c:5833: warning: unused parameter 'fd'
> > > sanei_scsi.c:5824: warning: unused parameter 'id'
> > > sanei_scsi.c:5819: warning: unused parameter 'idp'
> > > sanei_scsi.c:4809: warning: unused parameter 'findtype'
> > >
> > > I'm not worried about the unused parameters, as those often come up
> > > during compiling of any sources.  I'm just concerned about the error.
> > > I'm using the CVS version from June 17 2007.
>


-- 
"The truth is an offense, but not a sin"

Reply via email to