Re: [exim] Build warnings with Fedora Core 4

Página Inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Para: John Horne
CC: Exim users
Assunto: Re: [exim] Build warnings with Fedora Core 4
On Tue, 21 Jun 2005, John Horne wrote:

> Hello,
>
> Has anyone built Exim under Fedora Core 4 linux? I have downloaded the
> rpm source package from the FC4 extras for exim-4.51-2. Upon rebuilding
> the rpm I get a load of warnings from gcc across various source files.
> E.g:
>
> ==============================================================
> spool_in.c: In function 'spool_read_header':
> spool_in.c:584: warning: ignoring return value of 'sscanf', declared
> with attribute warn_unused_result


OK, strictly I guess there should be some (void) casts in a number of
function calls. Looks like your compiler has turned on some even more
agressive warning options. I'll see if I can do something about this.
Certainly those warnings don't indicate that anything will go wrong.

> exim_dbmbuild.c: In function 'main':
> exim_dbmbuild.c:198: warning: passing argument 2 of 'd->set_errcall'
> from incompatible pointer type
>
> exim_dbutil.c: In function 'dbfn_open':
> exim_dbutil.c:319: warning: passing argument 2 of
> 'dbblock->dbptr->set_errcall' from incompatible pointer type


That looks like the BDB 4.3 API change problem which was posted on the
list not too long ago. It will be fixed in 4.52, which I'm going to get
out before the end of the month. If you can't wait, the patch is below.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book





*** exim-4.51/src/dbfn.c    Wed May  4 12:35:39 2005
--- dbfn.c    Tue Jun 14 11:32:01 2005
***************
*** 40,51 ****


/* For Berkeley DB >= 2, we can define a function to be called in case of DB
errors. This should help with debugging strange DB problems, e.g. getting "File
! exists" when you try to open a db file. */

#if defined(USE_DB) && defined(DB_VERSION_STRING)
void
dbfn_bdb_error_callback(const char *pfx, char *msg)
{
pfx = pfx;
log_write(0, LOG_MAIN, "Berkeley DB error: %s", msg);
}
--- 40,58 ----

/* For Berkeley DB >= 2, we can define a function to be called in case of DB
errors. This should help with debugging strange DB problems, e.g. getting "File
! exists" when you try to open a db file. The API for this function was changed
! at DB release 4.3. */

#if defined(USE_DB) && defined(DB_VERSION_STRING)
void
+ #if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)
+ dbfn_bdb_error_callback(const DB_ENV *dbenv, const char *pfx, const char *msg)
+ {
+ dbenv = dbenv;
+ #else
dbfn_bdb_error_callback(const char *pfx, char *msg)
{
+ #endif
pfx = pfx;
log_write(0, LOG_MAIN, "Berkeley DB error: %s", msg);
}