Tim Bunce wrote:
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();

this won't do the same job?


--- DBIXS.h.orig 2003-03-09 13:21:34.000000000 +1100
+++ DBIXS.h 2003-03-10 11:40:39.000000000 +1100
@@ -410,12 +410,11 @@
# define DBISTATE_DECLARE typedef int dummy_dbistate /* keep semicolon from feeling lonely */
# define DBISTATE_ASSIGN(st)
# define DBISTATE_INIT
-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' */
+# define DBIS (*(dbistate_t**)&SvIVX(DBISTATE_ADDRSV))
+/* temp for bad drivers using 'dbis' instead of 'DBIS' */
+# define dbis (*(dbistate_t**)&SvIVX(DBISTATE_ADDRSV))
+


#else /* plain and simple non perl object / multiplicity case */


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to