On Sun, Mar 09, 2003 at 01:26:19PM +1100, Stas Bekman wrote:
> while building DBI-1.35 with blead-itreads perl I get:
> 
> 
> cc -c   -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
> -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
> -I/usr/include/gdbm -g   -DVERSION=\"1.35\" -DXS_VERSION=\"1.35\" -fpic 
> "-I/home/stas/perl/blead-ithread/lib/5.9.0/i686-linux-thread-multi/CORE" 
> -Wall -Wno-comment DBI.c
> DBIXS.h:413: warning: `get_dbistate' defined but not used
> 
> from DBIXS.h:
> 
> static dbistate_t **get_dbistate() {
>     return ((dbistate_t**)&SvIVX(DBISTATE_ADDRSV));
> }
> # undef DBIS
> # define DBIS (*get_dbistate())
> # define dbis (*get_dbistate()) /* temp for bad drivers using 'dbis' 
> instead of 'DBIS' */
> 
> it's used but in a peculiar way. Any ideas how to shut this warning?

I've seen it but never had time to dig into it. (The "peculiar way"
was implemented and donated by ActiveState and I've always been a
bit wary of fiddling with it.)

The easiest way might just be a dummy 'use' of get_dbistate:
        if (0) (void)get_dbistate();

Tim.

Reply via email to