netcdf/NCD4_dumpbytes-Add-missing-initialization-of-float-types.patch

27 lines
875 B
Diff
Raw Permalink Normal View History

From: Egbert Eich <eich@suse.com>
Date: Mon Jul 12 08:24:58 2021 +0200
Subject: NCD4_dumpbytes(): Add missing initialization of float types
Patch-mainline: Not yet
Git-repo: https://github.com/Unidata/netcdf-c
Git-commit: 429efb0b136d35c54f9db23f3c6affa1087514d2
References:
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
libdap4/d4dump.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libdap4/d4dump.c b/libdap4/d4dump.c
index b2e18931..442227ec 100644
--- a/libdap4/d4dump.c
+++ b/libdap4/d4dump.c
@@ -45,6 +45,8 @@ NCD4_dumpbytes(size_t size, const void* data0, int swap)
v.i32[0] = *((int*)pos);
v.u64[0] = *((unsigned long long*)pos);
v.i64[0] = *((long long*)pos);
+ v.f32[0] = *((float*)pos);
+ v.f64[0] = *((double*)pos);
if(swap) {
swapinline16(v.u16);
swapinline32(v.u32);