How to snuff warnings on float/int conversion
How to snuff warnings on float/int conversion
- Subject: How to snuff warnings on float/int conversion
- From: Ken Brooks <email@hidden>
- Date: Tue, 2 Jan 2007 14:53:38 -0500
Title: How to snuff warnings on float/int
conversion
The following code fragment:
struct Pipe {
int x, y, z;
P3
at; // P3 is a small struct of 3 floats
<other fields>
};
void Pipe::vmove(const V3 &delta) {
at +=
worldmove;
x = roundf(at.x);
y =
roundf(at.y);
z =
roundf(at.z);
}
Gets warnings like this on the lines like x =
roundf(at.x); :
/Users/ken/Programs/comp236/Catchwater/Pipeworks/Catchwater.cpp:731:
warning: converting to 'int' from 'float'
I don't want such warnings; I'm perfectly happy with implicit
truncation of floats. But I've read up and down the GCC manual's
warnings list and can't find where to turn them off.
-Wno-conversion doesn't get it, that only deals with function
prototypes. Anybody know how to do it?
Using gcc 4.0, XCode 2.0.
Ken Brooks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden