From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 11:38:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 784D14D2; Thu, 9 Apr 2015 11:38:11 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3A912922; Thu, 9 Apr 2015 11:38:10 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id B15C83C3A19; Thu, 9 Apr 2015 21:38:03 +1000 (AEST) Date: Thu, 9 Apr 2015 21:38:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrew Turner Subject: Re: svn commit: r281307 - head/sys/boot/efi/boot1 In-Reply-To: <201504091015.t39AFlkh016216@svn.freebsd.org> Message-ID: <20150409212938.T3716@besplex.bde.org> References: <201504091015.t39AFlkh016216@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=q1YeAlXh32Kr5aB29l0A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 11:38:11 -0000 On Thu, 9 Apr 2015, Andrew Turner wrote: > Log: > Print error values with hex to make it easier to find the EFI error type. > > Modified: > head/sys/boot/efi/boot1/boot1.c > > Modified: head/sys/boot/efi/boot1/boot1.c > ============================================================================== > --- head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:12:58 2015 (r281306) > +++ head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:15:47 2015 (r281307) > @@ -330,18 +330,18 @@ load(const char *fname) > status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, > buffer, bufsize, &loaderhandle); > if (EFI_ERROR(status)) > - printf("LoadImage failed with error %d\n", status); > + printf("LoadImage failed with error %lx\n", status); How would anyone guess that a number like "10" is in hex? Hex numbers should usually be printed using "%#..." format. If the boot loader doesn't have that, then use an 0x prefix. This shouldn't compile. 'status' cannot have type int and type unsigned long at the same time. clang warns even without -Wformat in CFLAGS. Bruce