From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753756AbcICPRj (ORCPT ); Sat, 3 Sep 2016 11:17:39 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34290 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbcICPRh (ORCPT ); Sat, 3 Sep 2016 11:17:37 -0400 MIME-Version: 1.0 In-Reply-To: <20160903145037.24685-1-nicolas.iooss_linux@m4x.org> References: <20160903145037.24685-1-nicolas.iooss_linux@m4x.org> From: Nilay Vaish Date: Sat, 3 Sep 2016 10:16:56 -0500 Message-ID: Subject: Re: [PATCH 1/1] x86, relocs: add function attributes to die() To: Nicolas Iooss Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86 , Linux Kernel list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3 September 2016 at 09:50, Nicolas Iooss wrote: > > arch/x86/tools/relocs.c:460:5: error: format specifies type 'int' > but the argument has type 'Elf64_Xword' (aka 'unsigned long') > [-Werror,-Wformat] > sec->shdr.sh_size); > ^~~~~~~~~~~~~~~~~ > arch/x86/tools/relocs.c:464:5: error: format specifies type 'int' > but the argument has type 'Elf64_Off' (aka 'unsigned long') > [-Werror,-Wformat] > sec->shdr.sh_offset, strerror(errno)); > ^~~~~~~~~~~~~~~~~~~ > > To support both 32-bit and 64-bit modes, add casts to long types and use > %lu and %ld to format the numbers. > Nicolas, should not just changing the format specifiers fix the problem? How do those type casts help? -- Nilay