diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-14 10:36:36 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-14 10:36:36 +0100 |
commit | c288b5294bb0e13ad2904a3ec79265f727baaea3 (patch) | |
tree | cf65e1821809b7ee8a9c37597189d126ef72aef5 /ext/pdo_firebird/firebird_driver.c | |
parent | f2ddfcc7bb2d3c6910ccf71c9d4972ac0f037aee (diff) | |
download | php-git-c288b5294bb0e13ad2904a3ec79265f727baaea3.tar.gz |
Fix compile warnings in PDO Firebird
Diffstat (limited to 'ext/pdo_firebird/firebird_driver.c')
-rw-r--r-- | ext/pdo_firebird/firebird_driver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index c299907f0f..390871cc20 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -171,10 +171,11 @@ static const char classes_array[] = { /* 127 */ 0 }; -inline char classes(char idx) +static inline char classes(char idx) { - if (idx > 127) return 0; - return classes_array[idx]; + unsigned char uidx = (unsigned char) idx; + if (uidx > 127) return 0; + return classes_array[uidx]; } typedef enum { @@ -1085,7 +1086,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /* char errmsg[512]; const ISC_STATUS *s = H->isc_status; fb_interpret(errmsg, sizeof(errmsg),&s); - zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%d] %s", + zend_throw_exception_ex(php_pdo_get_exception(), H->isc_status[1], "SQLSTATE[%s] [%ld] %s", "HY000", H->isc_status[1], errmsg); } |