On Wed, Nov 27, 2002 at 12:46:54AM -0700, Jason E. Stewart wrote: > "David Wheeler" <[EMAIL PROTECTED]> writes: > > > Hi All, > > > > I'm trying to eliminate the compiler warnings from DBD::Pg, and got it > > down to just one (from four). The warning is: > > > > > > Pg.xs: In function `XS_DBD__Pg__db_pg_notifies': > > Pg.xs:135: warning: assignment makes pointer from integer without a cast > > > > Line 135 is the last line of this function: > > > > void > > pg_notifies(dbh) > > SV * dbh > > CODE: > > D_imp_dbh(dbh); > > > > ST(0) = dbd_db_pg_notifies(dbh, imp_dbh); > > The following fixes it: > > ST(0) = (SV*) dbd_db_pg_notifies(dbh, imp_dbh); > > I committed it for you. I'll let a better C programmer explain why > this works.
You've just brushed the issue under he carpet. Always try to avoid using casts unless you know why you're doing so and that it's the right fix. In this case the problem is probably that when compiling Pg.xs (actually Pc.c) the compiler has not seen a declaration of the dbd_db_pg_notifies() function. Probably needs to be in a header file. Tim.
