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