com php-src: Fix compile warnings in PDO Firebird: ext/pdo_fi rebird/firebird_driver.c ext/pdo_firebird/php_pdo_f irebird_int.h

From: Date: Mon, 14 Dec 2020 09:36:36 +0000
Subject: com php-src: Fix compile warnings in PDO Firebird: ext/pdo_fi rebird/firebird_driver.c ext/pdo_firebird/php_pdo_f irebird_int.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-114430@lists.php.net to get a copy of this message
Commit: c288b5294bb0e13ad2904a3ec79265f727baaea3 Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 14 Dec 2020 10:36:36 +0100 Parents: f2ddfcc7bb2d3c6910ccf71c9d4972ac0f037aee Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c288b5294bb0e13ad2904a3ec79265f727baaea3 Log: Fix compile warnings in PDO Firebird Changed paths: M ext/pdo_firebird/firebird_driver.c M ext/pdo_firebird/php_pdo_firebird_int.h Diff: diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index c299907f0fe..390871cc200 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); } diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 094767fa355..70a895b4b9f 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -34,12 +34,11 @@ #define SHORT_MAX (1 << (8*sizeof(short)-1)) #if SIZEOF_ZEND_LONG == 8 && !defined(PHP_WIN32) -# define LL_MASK "l" # define LL_LIT(lit) lit ## L #else -# define LL_MASK "ll" # define LL_LIT(lit) lit ## LL #endif +#define LL_MASK "ll" /* Firebird API has a couple of missing const decls in its API */ #define const_cast(s) ((char*)(s))

« previous php.cvs (#114430) next »