From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andreas_Bie=c3=9fmann?= Date: Fri, 28 Aug 2015 09:20:18 +0200 Subject: [U-Boot] [PATCH v2 1/2] tools/atmelimage.c: Fix warning when debug is enabled In-Reply-To: <1440698088-1152-1-git-send-email-trini@konsulko.com> References: <1440616883-20885-1-git-send-email-trini@konsulko.com> <1440698088-1152-1-git-send-email-trini@konsulko.com> Message-ID: <55E00BB2.9000902@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de +u-boot ML On 08/27/2015 07:54 PM, Tom Rini wrote: > Otherwise we get: > tools/atmelimage.c:134:3: warning: format ?%d? expects argument of type ?int?, but argument 2 has type ?size_t? [-Wformat=] > debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1, > ^ > > Cc: Andreas Bie?mann > Signed-off-by: Tom Rini Reviewed-by: Andreas Bie?mann > > --- > Changes in v2: > - Use %zu not %ld as noted by Andreas Bie?mann > --- > tools/atmelimage.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/atmelimage.c b/tools/atmelimage.c > index 5b72ac5..6b5603e 100644 > --- a/tools/atmelimage.c > +++ b/tools/atmelimage.c > @@ -131,7 +131,7 @@ static int atmel_verify_header(unsigned char *ptr, int image_size, > > /* check the seven interrupt vectors of binary */ > for (pos = 0; pos < 7; pos++) { > - debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1, > + debug("atmelimage: interrupt vector #%zu is 0x%08X\n", pos+1, > ints[pos]); > /* > * all vectors except the 6'th one must contain valid >