math/test/test.cpp has invalid calls

The function calls ceil() and floor() but passes an int and there
is obviously no implementation for that so clang fails.

It seems like exp should be a float from this code.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-04-24 01:40:46 -07:00
parent a1332e699c
commit 4cedcfc58e

View File

@ -59,6 +59,9 @@ void __EXPORT float2SigExp(
float &sig,
int &exp)
{
// FIXME - This code makes no sense when exp is an int
// FIXME - isnan and isinf not defined for QuRT
#ifndef __PX4_QURT
if (isnan(num) || isinf(num)) {
sig = 0.0f;
exp = -99;
@ -79,6 +82,7 @@ void __EXPORT float2SigExp(
} else {
exp = floor(exp);
}
#endif
sig = num;