summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-08-27 19:22:38 +0200
committerJeremy Allison <jra@samba.org>2017-08-29 01:00:34 +0200
commit7b58c8f54499f01778bcbfc2ad21521ceed2dd57 (patch)
tree80c6956dfa7a5a13e56b6d6c0abc7423736ac67e /source3
parentdd3e06f14ec1788a59e4c6ba4ea165fd77b9135e (diff)
downloadsamba-7b58c8f54499f01778bcbfc2ad21521ceed2dd57.tar.gz
s3/mdssvc: missing assignment in sl_pack_float
Spotted by -Werror=maybe-uninitialized: ../source3/rpc_server/mdssvc/marshalling.c: In function ‘sl_pack_float’: ../source3/rpc_server/mdssvc/marshalling.c:171:11: error: ‘ieee_fp_union.w’ may be used uninitialized in this function [-Werror=maybe-uninitialized] offset = sl_push_uint64_val(buf, offset, bufsize, ieee_fp_union.w); Bug: https://bugzilla.samba.org/show_bug.cgi?id=12991 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/mdssvc/marshalling.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/rpc_server/mdssvc/marshalling.c b/source3/rpc_server/mdssvc/marshalling.c
index 0a02f418722..976702c49d4 100644
--- a/source3/rpc_server/mdssvc/marshalling.c
+++ b/source3/rpc_server/mdssvc/marshalling.c
@@ -164,6 +164,8 @@ static ssize_t sl_pack_float(double d, char *buf, ssize_t offset, size_t bufsize
uint64_t w;
} ieee_fp_union;
+ ieee_fp_union.d = d;
+
offset = sl_push_uint64_val(buf, offset, bufsize, sl_pack_tag(SQ_TYPE_FLOAT, 2, 1));
if (offset == -1) {
return -1;