Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572180

Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die()

From hpa@zytor.com
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die()
Date 2017-02-02 08:50 +0100
Message-ID <t6kjw-SI-11@gated-at.bofh.it> (permalink)
References <sPPD3-65L-7@gated-at.bofh.it> <t5Z5p-3VC-43@gated-at.bofh.it> <t6bSW-3Oo-7@gated-at.bofh.it> <t6jQt-Iw-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Ingo Molnar <mingo@kernel.org> - 2017-02-01 10:10 +0100
  Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Nicolas Iooss <nicolas.iooss_linux@m4x.org> - 2017-02-01 23:50 +0100
    Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Ingo Molnar <mingo@kernel.org> - 2017-02-02 08:20 +0100
      Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() hpa@zytor.com - 2017-02-02 08:50 +0100
        Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die() Ingo Molnar <mingo@kernel.org> - 2017-02-02 20:40 +0100

csiph-web