From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] mini-os: enable compiler check for printk format types Date: Mon, 6 Oct 2014 14:28:50 +0100 Message-ID: <1412602130.14255.8.camel@citrix.com> References: <1407318240-1799-1-git-send-email-talex5@gmail.com> <20140807145509.GK3426@type.youpi.perso.aquilenet.fr> <20140808143207.GA18842@type.bordeaux.inria.fr> <1412326515.423.11.camel@citrix.com> <20141005193018.GP5718@type> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xb8LR-0000dd-G3 for xen-devel@lists.xenproject.org; Mon, 06 Oct 2014 13:28:57 +0000 In-Reply-To: <20141005193018.GP5718@type> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Samuel Thibault Cc: "xen-devel@lists.xenproject.org" , Thomas Leonard , Stefano Stabellini , David Scott , Anil Madhavapeddy List-Id: xen-devel@lists.xenproject.org On Sun, 2014-10-05 at 21:30 +0200, Samuel Thibault wrote: > > Samuel, are you ok with the patch after those clarifications? > > Yes. I interpreted this as an Acked-by, I hope that's ok, and was about to commit when: disk_read.c: In function 'vtpm_load_disk': disk_read.c:539:59: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format] disk_read.c:539:59: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format] disk_read.c:540:2: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format] disk_read.c:540:2: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format] disk_read.c:542:30: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format] disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format] disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format] disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format] disk_read.c:545:47: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format] disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format] disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'unsigned int' [-Werror=format] disk_read.c:548:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'unsigned int' [-Werror=format] disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'unsigned int' [-Werror=format] disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Werror=format] disk_read.c:551:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Werror=format] That's on an x86_32 stubdom build. Looks like this is printing the output of sizeof. The correct modifier for printing a size_t is %zu not hardcoded as a long. I haven't checked if mini-os printf supports z. > Reviewing it just kept being behind loads of stuff in my TODO list :/ I know the feeling :-/