aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-04-14 13:33:45 +0200
committerSverker Eriksson <[email protected]>2015-04-15 19:02:13 +0200
commit80683a598eda7bea94eb54f9f9557e020b2fdb2c (patch)
tree629550a18d62b54f7333cf644ecca953ba1c6efa /erts
parent1a9bb4615bebc4cc37bf436c7d5c6c8fd7b730e8 (diff)
downloadotp-80683a598eda7bea94eb54f9f9557e020b2fdb2c.tar.gz
otp-80683a598eda7bea94eb54f9f9557e020b2fdb2c.tar.bz2
otp-80683a598eda7bea94eb54f9f9557e020b2fdb2c.zip
erts: Fix compile warning in enif_make_double
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_nif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 8b6cb880a3..6fa8164787 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -967,10 +967,11 @@ ERL_NIF_TERM enif_make_uint64(ErlNifEnv* env, ErlNifUInt64 i)
ERL_NIF_TERM enif_make_double(ErlNifEnv* env, double d)
{
Eterm* hp;
+ FloatDef f;
+
if (!erts_isfinite(d))
return enif_make_badarg(env);
hp = alloc_heap(env,FLOAT_SIZE_OBJECT);
- FloatDef f;
f.fd = d;
PUT_DOUBLE(f, hp);
return make_float(hp);