summaryrefslogtreecommitdiff
path: root/ext/mysqlnd
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-06-23 12:47:06 +0300
committerDmitry Stogov <dmitry@zend.com>2016-06-23 12:47:06 +0300
commitadc95c511495f00cd1a90feff5fff7968e38fc4a (patch)
tree594019d7d287296c8bd12b47ff41e889f84aa7f9 /ext/mysqlnd
parent4ac29543d6e70d6914e85d36f9b50e18968ebea6 (diff)
downloadphp-git-adc95c511495f00cd1a90feff5fff7968e38fc4a.tar.gz
Fixed compilation warnings
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c2
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.c1
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c2
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c2
4 files changed, 4 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index bb582dbf6a..701bc282e1 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -620,7 +620,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u persistent=%u state=%u",
hostname.s?hostname.s:"", username.s?username.s:"", database.s?database.s:"", port, mysql_flags,
- conn? conn->persistent:0, conn? GET_CONNECTION_STATE(&conn->state):-1);
+ conn? conn->persistent:0, conn? (int)GET_CONNECTION_STATE(&conn->state):-1);
if (GET_CONNECTION_STATE(&conn->state) > CONN_ALLOCED) {
DBG_INF("Connecting on a connected handle.");
diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c
index b90081a0ef..7e1e378578 100644
--- a/ext/mysqlnd/mysqlnd_plugin.c
+++ b/ext/mysqlnd/mysqlnd_plugin.c
@@ -60,6 +60,7 @@ static struct st_mysqlnd_typeii_plugin_example mysqlnd_example_plugin =
}
},
NULL, /* methods */
+ 0
};
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index d989101060..086866d1ae 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -184,7 +184,7 @@ ps_fetch_float(zval * zv, const MYSQLND_FIELD * const field, const unsigned int
# define NOT_FIXED_DEC 31
#endif
- dval = mysql_float_to_double(fval, (field->decimals >= NOT_FIXED_DEC) ? -1 : field->decimals);
+ dval = mysql_float_to_double(fval, (field->decimals >= NOT_FIXED_DEC) ? -1 : (int)field->decimals);
ZVAL_DOUBLE(zv, dval);
DBG_VOID_RETURN;
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index 825c56feae..48b64c19f0 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -1611,7 +1611,7 @@ php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zv
MYSQLND_INC_CONN_STATISTIC_W_VALUE2(stats, statistic, 1,
STAT_BYTES_RECEIVED_PURE_DATA_PS,
(Z_TYPE_P(current_field) == IS_STRING)?
- Z_STRLEN_P(current_field) : (p - orig_p));
+ Z_STRLEN_P(current_field) : (size_t)(p - orig_p));
if (!((bit<<=1) & 255)) {
bit = 1; /* to the following byte */