Skip to content

Commit 87863c1

Browse files
committed
Removed warnings.
1 parent 45defd5 commit 87863c1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/msgpack/v2/x3_parse.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ const auto mp_object_def =
297297
(
298298
[](auto& ctx){
299299
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
300-
union { uint32_t i; float f; } mem;
301-
mem.i = _attr(ctx);
300+
union { uint32_t i; float f; } mem = { _attr(ctx) };
302301
app_specific.vis.visit_float32(mem.f);
303302
}
304303
)
@@ -309,8 +308,7 @@ const auto mp_object_def =
309308
(
310309
[](auto& ctx){
311310
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
312-
union { uint64_t i; double f; } mem;
313-
mem.i = _attr(ctx);
311+
union { uint64_t i; double f; } mem = { _attr(ctx) };
314312
#if defined(TARGET_OS_IPHONE)
315313
// ok
316314
#elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi

0 commit comments

Comments
 (0)