diff options
author | Keyur Govande <keyur@php.net> | 2014-12-26 20:37:50 +0000 |
---|---|---|
committer | Keyur Govande <keyur@php.net> | 2014-12-26 20:37:50 +0000 |
commit | 83e55478279f8bb366e5f5a482619c5e47731980 (patch) | |
tree | b7554899ac88bedfcde953f37e3762d362190b57 | |
parent | 76d6c4f9ec37558f5aa95e2325e5b9360bfe129e (diff) | |
parent | aa192f57c9d867ab3d7be69c7f269cfd7a10d14f (diff) | |
download | php-git-83e55478279f8bb366e5f5a482619c5e47731980.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Fix for failing tests. gcc 4.8.3 would optimize away the assigment.
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps_codec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 3af19cbc95..20334dfc72 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; |