mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
Fix -Wunused-function warning in ext/pdo_firebird (#15646)
When FB_API_VER equals to 30, for example, on Ubuntu, there is this warning thrown with certain compiler configurations: /php-src/ext/pdo_firebird/pdo_firebird_utils.cpp:21:13: warning: ‘void fb_copy_status(const ISC_STATUS*, ISC_STATUS*, size_t)’ defined but not used [-Wunused-function] 21 | static void fb_copy_status(const ISC_STATUS* from, ISC_STATUS* to, size_t maxLength) | ^~~~~~~~~~~~~~
This commit is contained in:
parent
7ebdd7d05a
commit
09d5b7102a
@ -18,16 +18,6 @@
|
||||
#include <firebird/Interface.h>
|
||||
#include <cstring>
|
||||
|
||||
static void fb_copy_status(const ISC_STATUS* from, ISC_STATUS* to, size_t maxLength)
|
||||
{
|
||||
for(size_t i=0; i < maxLength; ++i) {
|
||||
memcpy(to + i, from + i, sizeof(ISC_STATUS));
|
||||
if (from[i] == isc_arg_end) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns the client version. 0 bytes are minor version, 1 bytes are major version. */
|
||||
extern "C" unsigned fb_get_client_version(void)
|
||||
{
|
||||
@ -51,6 +41,15 @@ extern "C" ISC_DATE fb_encode_date(unsigned year, unsigned month, unsigned day)
|
||||
}
|
||||
|
||||
#if FB_API_VER >= 40
|
||||
static void fb_copy_status(const ISC_STATUS* from, ISC_STATUS* to, size_t maxLength)
|
||||
{
|
||||
for(size_t i=0; i < maxLength; ++i) {
|
||||
memcpy(to + i, from + i, sizeof(ISC_STATUS));
|
||||
if (from[i] == isc_arg_end) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Decodes a time with time zone into its time components. */
|
||||
extern "C" ISC_STATUS fb_decode_time_tz(ISC_STATUS* isc_status, const ISC_TIME_TZ* timeTz, unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,
|
||||
|
Loading…
Reference in New Issue
Block a user