From: Andrey Hristov Date: Mon, 4 Oct 2010 14:12:31 +0000 (+0000) Subject: add some safe casts - lower the number of warnings by 2 X-Git-Tag: php-5.3.4RC1~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f73a4e045e9dfefad8b7f62ff6307ee70be5c4e;p=php add some safe casts - lower the number of warnings by 2 --- diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index e2fc9b62d7..b95d6f00df 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -84,7 +84,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field, #endif /* #if SIZEOF_LONG==4 */ { if (byte_count < 8 || uval <= L64(9223372036854775807)) { - ZVAL_LONG(zv, uval); + ZVAL_LONG(zv, (long) uval); /* the cast is safe, we are in the range */ } else { DBG_INF("stringify"); tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval); @@ -112,7 +112,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field, } else #endif /* SIZEOF */ { - ZVAL_LONG(zv, lval); + ZVAL_LONG(zv, (long) lval); /* the cast is safe, we are in the range */ } }