From d4471c6aaecab2f1cc467ea8e92040c73685bd21 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 14 Apr 2020 10:36:55 +0200 Subject: [PATCH] Remove int6store() The implementation is broken (syntactically). As it's not used anyway, I'm just dropping it instead. --- ext/mysqli/mysqli_api.c | 2 +- ext/mysqlnd/mysqlnd_portability.h | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 80c8ca76fa1..e924a90ef95 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1715,7 +1715,7 @@ static int mysqli_options_get_option_zval_type(int option) case MYSQL_OPT_LOCAL_INFILE: case MYSQL_OPT_NAMED_PIPE: #ifdef MYSQL_OPT_PROTOCOL - case MYSQL_OPT_PROTOCOL: + case MYSQL_OPT_PROTOCOL: #endif /* MySQL 4.1.0 */ case MYSQL_OPT_READ_TIMEOUT: case MYSQL_OPT_WRITE_TIMEOUT: diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h index 20649061933..5bed10a690c 100644 --- a/ext/mysqlnd/mysqlnd_portability.h +++ b/ext/mysqlnd/mysqlnd_portability.h @@ -154,15 +154,6 @@ This file is public domain and comes with NO WARRANTY of any kind */ *(((zend_uchar *)(T))+3)=(zend_uchar) (((A) >> 24)); \ *(((zend_uchar *)(T))+4)=(zend_uchar) (((A) >> 32)); } -/* From Andrey Hristov, based on int5store() */ -#define int6store(T,A) { \ - *(((zend_uchar *)(T)))= (zend_uchar)((A));\ - *(((zend_uchar *)(T))+1))=(zend_uchar) (((A) >> 8));\ - *(((zend_uchar *)(T))+2))=(zend_uchar) (((A) >> 16));\ - *(((zend_uchar *)(T))+3))=(zend_uchar) (((A) >> 24)); \ - *(((zend_uchar *)(T))+4))=(zend_uchar) (((A) >> 32)); \ - *(((zend_uchar *)(T))+5))=(zend_uchar) (((A) >> 40)); } - #define int8store(T,A) *((uint64_t *) (T))= (uint64_t) (A) typedef union { @@ -236,14 +227,6 @@ typedef union { *(((char *)(T))+2) = (char)(((A) >> 16));\ *(((char *)(T))+3) = (char)(((A) >> 24)); \ *(((char *)(T))+4) = (char)(((A) >> 32)); } while (0) -/* Based on int5store() from Andrey Hristov */ -#define int6store(T,A) do { \ - *(((char *)(T))) = (char)((A));\ - *(((char *)(T))+1) = (char)(((A) >> 8));\ - *(((char *)(T))+2) = (char)(((A) >> 16));\ - *(((char *)(T))+3) = (char)(((A) >> 24)); \ - *(((char *)(T))+4) = (char)(((A) >> 32)); \ - *(((char *)(T))+5) = (char)(((A) >> 40)); } while (0) #define int8store(T,A) { uint32_t def_temp= (uint32_t) (A), def_temp2= (uint32_t) ((A) >> 32); \ int4store((T),def_temp); \ int4store((T+4),def_temp2); \