1From 0c53fd776af9631c915c8722e1d68ce9a69fa3f6 Mon Sep 17 00:00:00 2001
2From: Andreas Walter <andreas.walter@waltronix.de>
3Date: Fri, 26 Feb 2021 11:49:25 +0100
4Subject: [PATCH] fix(core): Explicit cast to avoid compiler warning (#4203)
5
6[Retrieved from:
7https://github.com/open62541/open62541/commit/0c53fd776af9631c915c8722e1d68ce9a69fa3f6]
8Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
9---
10 src/ua_types_encoding_binary.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/ua_types_encoding_binary.c b/src/ua_types_encoding_binary.c
14index 0fe88eb98e0..abbd23735d3 100644
15--- a/src/ua_types_encoding_binary.c
16+++ b/src/ua_types_encoding_binary.c
17@@ -319,7 +319,7 @@ static long double
18 unpack754(uint64_t i, unsigned bits, unsigned expbits) {
19     unsigned significandbits = bits - expbits - 1;
20     long double result = (long double)(i&(uint64_t)((1LL<<significandbits)-1));
21-    result /= (1LL<<significandbits);
22+    result /= (long double)(1LL<<significandbits);
23     result += 1.0f;
24     unsigned bias = (unsigned)(1<<(expbits-1)) - 1;
25     long long shift = (long long)((i>>significandbits) & (uint64_t)((1LL<<expbits)-1)) - bias;
26