Thank you very much for your quick replies! But, I must admit, I am somewhat confused by the responses thus far, as I am not providing my own function pointers to sqlite3_bind_text. My intent is to provide none. My class methods are responsible for managing the buffer being provided to the bind. I'd be very happy passing NULL, but the API reference at sqlite.org and the source documentation (sqlite3.h) implies to me that if I'm not providing a destructor pointer than I am to use one of the special values.
>From sqlite3.h: ** If the destructor ** argument is SQLITE_STATIC, it means that the content pointer is constant ** and will never change. This best describes my implementation. sqlite3_bind_text( pStmt, col, pBuffer, lBufLen, SQLITE_STATIC ); Clearly, the C++ compiler is substituting SQLITE_STATIC with ((void(*)(void *))0), as the warning from the Solaris C++ compiler claims: Warning (Anachronism): Formal argument 5 of type extern "C" void(*)(void*) in call to sqlite3_bind_text(sqlite3_stmt*, int, const char*, int, extern "C" void(*)(void*)) is being passed void(*)(void*). Yes, it is being passed as void(*)(void*) because that's what the sqlite3 SQLITE_STATIC is #defined as... So, in short, is NULL a valid value for the parameter here, or is the use of these #defines required due to assert() statements within the vdbe such as: assert( pMem->xDel==0 || (pMem->flags & MEM_Dyn)!=0 ); If NULL is the wrong way to sidestep this issue, what is typically done to placate this warning? Thanks again, -- Gerry Blanchette -----Original Message----- From: Gé Weijers [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 1:09 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_bind_text() and SQLITE_STATIC question Ulrik Petersen wrote: > > Likewise, the function that you pass should be declared 'extern "C"' if > it's one of your own functions. I agree with this one. extern "C" void foo (void*); and void foo (void *); are two different types.