I found a compile warning in APR, following is a C program that will 
report warning when compiled in my system:

~/Downloads/apr-1.6.5$ cat a.c
#include <apr.h>
#include <stdio.h>

int main(void)
        apr_off_t a = 0;
        printf("%" APR_OFF_T_FMT "\n", a);
~/Downloads/apr-1.6.5$ gcc -I./include a.c
a.c:7:33: warning: format specifies type 'long' but the argument has type
      'apr_off_t' (aka 'long long') [-Wformat]
        printf("%" APR_OFF_T_FMT "\n", a);
                ~~~                    ^
1 warning generated.

I checked apr.h and found it define APR_OFF_T_FMT as "ld" because macro
DARWIN_10 is not defined.

APR version: 1.6.5

Outputs of `uname -a`:
Darwin wzhdeMacBook-Pro.local 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 
20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64

Outputs of `gcc --version`:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr 
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin 

Reply via email to