projects
/
php
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80260bc
)
Fix for failing tests. gcc 4.8.3 would optimize away the assigment.
author
Keyur Govande
<keyur@php.net>
Fri, 26 Dec 2014 20:36:19 +0000
(20:36 +0000)
committer
Keyur Govande
<keyur@php.net>
Fri, 26 Dec 2014 20:36:19 +0000
(20:36 +0000)
ext/mysqlnd/mysqlnd_ps_codec.c
patch
|
blob
|
history
diff --git
a/ext/mysqlnd/mysqlnd_ps_codec.c
b/ext/mysqlnd/mysqlnd_ps_codec.c
index d96091210b3a5802c4873e229f8da6e72dec82de..a57ff5d6a4e6a694fb26199bd50c56ed64cba180 100644
(file)
--- 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;