[Developers] over 1000 compiler warnings when compiling CactusBase/LocalReduce

Erik Schnetter schnetter at cct.lsu.edu
Fri Dec 23 17:12:04 CST 2005

On Dec 23, 2005, at 14:57:09, Jonathan Thornburg wrote:

> [[ops, sorry, wrong subject line, the first time -- reposting
> so people will see it with a correct subject line]]
> If I compile CactusBase/LocalReduce (current CVS) with gcc 3.3.2,
> with compile options
>   -g -pipe -ffast-math
>   -Wall -W -Wformat -Wno-unused -Wshadow -Winline -Wpointer-arith
>   -Wcast-align -Wcast-qual -Wmissing-declarations -Wbad-function-cast
>   -Wstrict-prototypes -Wmissing-prototypes
> I get a total of 1360 (!) compiler warnings "cast discards qualifiers
> from pointer target type".  Here, for example, are warnings for a  
> single
> function in a single source file:
> /home/jonathan/cactus/Cactus/configs/test-movingexcision/build/ 
> LocalReduce/AvgFu
> nctions.c: In function `LocalReduce_Avg_INT4':
> /home/jonathan/cactus/Cactus/configs/test-movingexcision/build/ 
> LocalReduce/AvgFu
> nctions.c:1010: warning: cast discards qualifiers from pointer  
> target type


> Is this as it should be?  That is, are these warnings symptoms of
> an overly-paranoid compiler, genuine bugs, or what?

It's a compiler that hides information from us.  It would be nice to  
know what qualifier this is.

I think the weight treatment is missing a const qualifier.  The  
weight seems to be cast from (void const *) to (CCTK_REAL *) before  
it is dereferenced.  If this is the only problem, then it is harmless.


Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20051224/0ad0acb4/attachment.bin 

More information about the Developers mailing list