| 116 | #endif |
| 117 | |
| 118 | static inline const char *parse_float(const char *buf, size_t len, float *result) |
| 119 | { |
| 120 | const char *end; |
| 121 | double v; |
| 122 | union { uint32_t u32; float f32; } inf; |
| 123 | inf.u32 = 0x7f800000; |
| 124 | |
| 125 | end = parse_double(buf, len, &v); |
| 126 | *result = (float)v; |
| 127 | if (parse_float_isinf(*result)) { |
| 128 | *result = v < 0 ? -inf.f32 : inf.f32; |
| 129 | return buf; |
| 130 | } |
| 131 | return end; |
| 132 | } |
| 133 | |
| 134 | #include "pdiagnostic_pop.h" |
| 135 |
nothing calls this directly
no test coverage detected