From 4cedcfc58efe80466f056be00c9d67dbdd0b0760 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Fri, 24 Apr 2015 01:40:46 -0700 Subject: [PATCH] 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 --- src/lib/mathlib/math/test/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/mathlib/math/test/test.cpp b/src/lib/mathlib/math/test/test.cpp index c52771ab8c..aff31bca0d 100644 --- a/src/lib/mathlib/math/test/test.cpp +++ b/src/lib/mathlib/math/test/test.cpp @@ -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;