apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: apr_ssize_t warning?
Date Sat, 23 Jun 2007 16:38:27 GMT
Ben Collins-Sussman wrote:
> When building subversion's trunk today, my gcc (4.0.1, darwin,
> coreduo) gave this warning:

uname -r ?

> 
>     subversion/libsvn_repos/dump.c:76: warning: format '%d' expects
> type 'int', but argument 3 has type 'apr_ssize_t'
> 
> The line of code is:
> 
>     apr_psprintf(pool, "K %" APR_SSIZE_T_FMT "\n", keylen));
> 
> For some reason, the configure script believes that an apr_ssize_t is
> the same size as an int?  (%d, rather than %ld ?)

There is a specific test for darwin in configure.in:

        osver=`uname -r`
        case $osver in
           [0-7].*)
              ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
              ;;
           *)
              ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
              ;;

> Not sure if this is a bug, or what.

Definitely a bug.

--
Davi Arnaut

Mime
View raw message