summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps_codec.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2015-01-26 11:52:53 +0100
committerOndřej Surý <ondrej@sury.org>2015-01-26 11:52:53 +0100
commit832b62efb8fceebb220116d8024d945a9bd31d7e (patch)
treee3c65d02b50180c7d7d7c21626d403d2eb87793a /ext/mysqlnd/mysqlnd_ps_codec.c
parent60fede4c90746ef3408ed27a15dd405b3a46a83b (diff)
downloadphp-upstream/5.6.5+dfsg.tar.gz
New upstream version 5.6.5+dfsgupstream/5.6.5+dfsg
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index 3af19cbc9..20334dfc7 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -195,7 +195,8 @@ ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, unsigned int pack_l
#ifdef HAVE_DECIMAL_FP_SUPPORT
{
typedef float dec32 __attribute__((mode(SD)));
- dec32 d32val = fval;
+ /* volatile so the compiler will not optimize away the conversion */
+ volatile dec32 d32val = fval;
/* The following cast is guaranteed to do the right thing */
dval = (double) d32val;