[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions w

From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Use noreturn attribute in clang versions which support it
Date: Thu, 24 Oct 2013 15:14:03 +0200
User-agent: Mutt/

On Wed, Oct 23, 2013 at 11:58:34AM +0200, Peter Bex wrote:
> On Wed, Oct 23, 2013 at 11:53:13AM +0200, Moritz Heidkamp wrote:
> > BTW, I got another warning when running the tests:
> > 
> >   ../chicken 'embedded4.scm' -output-file 'a.c' -scrutinize -verbose 
> > -include-path ..
> >   'clang' 'a.c' -o 'a.o' -c  -fno-strict-aliasing -fwrapv 
> > -DC_EMBEDDED -I.. 
> > -I"/home/syn/code/public/chicken/core/target/include/chicken"
> >   'clang' 'embedded3.c' -o 'embedded3.o' -c  -fno-strict-aliasing -fwrapv 
> > -DC_EMBEDDED -I.. 
> > -I"/home/syn/code/public/chicken/core/target/include/chicken"
> >   embedded3.c:23:26: warning: format specifies type 'unsigned int' but the 
> > argument has type 'long' [-Wformat]
> >     printf("data: %08x\n", val);
> >                   ~~~~     ^~~
> >                   %08lx
> > 
> > Not sure if this is something to worry about, though.
> Ah, I guess we should take a look at it.  It's not a huge deal, but for
> sanity we should use the correct format or cast it, or something.

Here's a simple patch that works.  I've copied the definition for the
format strings from runtime.c

I briefly considered moving it to chicken.h, but then it'd have to get
renamed everywhere to be prefixed C_ (as that's CHICKEN's "namespace"),
and it's not used anywhere else AFAICT, so that's not worth it for now.


Attachment: 0001-Get-rid-of-clang-warnings-in-embedded3-test.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]