com php-src: Fix compiler warnings, always cast to zend_long from sqlite3_int64 when converting to a zval: ext/sqlite3/sqlite3.c
| From: | Kalle Sommer Nielsen | Date: | Thu, 20 Oct 2016 08:57:38 +0000 |
| Subject: | com php-src: Fix compiler warnings, always cast to zend_long from sqlite3_int64 when converting to a zval: ext/sqlite3/sqlite3.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95236@lists.php.net to get a copy of this message | ||
Commit: f38834a18057fd605d456c670a4ed88a2f671ee0
Author: Kalle Sommer Nielsen <kalle@php.net> Thu, 20 Oct 2016 10:57:38 +0200
Parents: 6ca38e8cf8a4fa4b11a4a92131ef8f476659b7a9
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f38834a18057fd605d456c670a4ed88a2f671ee0
Log:
Fix compiler warnings, always cast to zend_long from sqlite3_int64 when converting to a zval
Changed paths:
M ext/sqlite3/sqlite3.c
Diff:
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 969eb31..07949a9 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -251,7 +251,7 @@ PHP_METHOD(sqlite3, lastInsertRowID)
return;
}
- RETURN_LONG(sqlite3_last_insert_rowid(db_obj->db));
+ RETURN_LONG((zend_long) sqlite3_last_insert_rowid(db_obj->db));
}
/* }}} */
@@ -583,7 +583,7 @@ static void sqlite_value_to_zval(sqlite3_stmt *stmt, int column, zval *data) /*
ZVAL_STRINGL(data, (char *)sqlite3_column_text(stmt, column), sqlite3_column_bytes(stmt,
column));
} else {
#endif
- ZVAL_LONG(data, val);
+ ZVAL_LONG(data, (zend_long) val);
#if LONG_MAX <= 2147483647
}
#endif