Messages in this thread | | | Date | Thu, 2 Feb 2017 20:30:17 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() |
| |
* hpa@zytor.com <hpa@zytor.com> wrote:
> On February 1, 2017 11:16:00 PM PST, Ingo Molnar <mingo@kernel.org> wrote: > > > >* Nicolas Iooss <nicolas.iooss_linux@m4x.org> wrote: > > > >> With %Ld, my compiler (gcc 6.3.1 on x86_64) complains: > >> > >> arch/x86/tools/relocs.c:400:7: error: format ‘%Ld’ expects argument > >of > >> type ‘long long int’, but argument 2 has type ‘Elf64_Off {aka long > >> unsigned int}’ [-Werror=format=] > > > >How did it pick up that type as an 'unsigned long'? We have: > > > > include/uapi/linux/elf.h:typedef __u64 Elf64_Off; > > > >Even user-space has it as a pure 64-bit type: > > > > /usr/include/elf.h:typedef uint64_t Elf64_Off; > > > >Thanks, > > > > Ingo > > uint64_t is unsigned long on x86-64.
Sight, which is a big, lame mistake, because it forces such crap like "PRIu64" uglies...
Thanks,
Ingo
| |