blob: a06ffeecc91a7e16c69e2979b9a0007d0f153674 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Starting with GCC 5, the __builtin_isnan() fucntion requires proper overloaded types, even in C:
* osptransapi.c:1040:13: error: non-floating-point argument in call to function ‘__builtin_isnan’
* OSPM_ISNAN(metrics.mean, tnisnan);
See also:
https://bugs.gentoo.org/show_bug.cgi?id=581058
--- a/src/osptransapi.c
+++ b/src/osptransapi.c
@@ -983,7 +983,7 @@
/* sample mean - have to cast Samples to a float to get some precision on the mean */
mean = ((metrics.mean * currnumber) + (ospvMean * ospvSamples)) / (float)metrics.samples;
- OSPM_ISNAN(metrics.mean, tnisnan);
+ OSPM_ISNAN((double)metrics.mean, tnisnan);
if (tnisnan) {
errcode = OSPC_ERR_TRAN_INVALID_CALC;
|