[MINC-development] clearing compile warnings
Steve M. Robbins
steve at sumost.ca
Sat Jan 12 13:49:57 EST 2008
On Sat, Jan 12, 2008 at 12:09:58PM +1100, Andrew Janke wrote:
> > Since I hear that 2.0.15 is imminent, I thought I'd see if I can
> > remove some of the warnings emitted by gcc -Wall in hopes of having it
> > build on sparc and arm.
> >
> > I committed changes to remove unused variables.
>
> Oh? I didnt see these.
I felt those changes would be uncontroversial, so I committed them
before sending the e-mail. Using "cvs diff -d '1 week ago'" should
reveal them to you.
> Either that or did you mean the rcsid vars?
No, I didn't touch those. My initial inclination was to rip them out,
but not before asking so thanks for the poke on the "geeks" list. I
don't see any need for them, myself. As you point out on the "geeks"
list, we have "-version" for most (if not all) programs.
If removing them is controversial, I had planned to attach
__attribute__ unused [1] to all of them. That at least shuts
up the gcc warning.
> > There are also a number of unhandled cases in switch
> > statements.
>
> Aye, these seem to become more and more prevalent with each new
> release of Netcdf/HDF5.
>
> > Attached is a patch that clears some of them,
> > for your consideration. Is logging an error message
> > in MI_TO_DOUBLE / MI_FROM_DOUBLE kosher?
>
> I would think so. I didnt even know they had come up with a NC_NAT "type".
Thanks for applying this to the sources.
> > In the minc_convenience patch?
>
> This one I am not so sure of.
OK. What issue do you see with it?
> Of course this as you well know is only
> the tip of the iceberg of warnings... :)
Yes. I started with some low-hanging fruit. There are a number
of more serious ones that I plan to get at in the coming days.
If you and others start looking at them, we'll get through
them even more quickly!
-Steve
[1] http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Variable-Attributes.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.bic.mni.mcgill.ca/pipermail/minc-development/attachments/20080112/1a6bffd0/attachment.bin
More information about the MINC-development
mailing list