diff options
author | Andrey Hristov <andrey@php.net> | 2010-05-03 13:51:30 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-05-03 13:51:30 +0000 |
commit | 8fd0407b3ab509796932458e3dd37c6b82952107 (patch) | |
tree | f66770aea92a30053851985d62c2679ae0759bb2 /ext/mysqlnd/mysqlnd_debug.c | |
parent | d0abd9510e98252c268033dcdd1d4dacd859472b (diff) | |
download | php-git-8fd0407b3ab509796932458e3dd37c6b82952107.tar.gz |
Fix compiler warnings - unused functions
Diffstat (limited to 'ext/mysqlnd/mysqlnd_debug.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_debug.c | 95 |
1 files changed, 41 insertions, 54 deletions
diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index e1a01acc08..b301f1d8c7 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -28,60 +28,6 @@ #include "mysqlnd_statistics.h" #include "zend_builtin_functions.h" -static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); -static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D); -static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_malloc(size_t size MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); -static void * mysqlnd_zend_mm_realloc(void * ptr, size_t new_size MYSQLND_MEM_D); -static void mysqlnd_zend_mm_free(void * ptr MYSQLND_MEM_D); -static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D); -static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D); - -#define MYSQLND_DEBUG_MEMORY 1 - -struct st_mysqlnd_allocator_methods mysqlnd_allocator = -{ -#if MYSQLND_DEBUG_MEMORY - _mysqlnd_emalloc, - _mysqlnd_pemalloc, - _mysqlnd_ecalloc, - _mysqlnd_pecalloc, - _mysqlnd_erealloc, - _mysqlnd_perealloc, - _mysqlnd_efree, - _mysqlnd_pefree, - _mysqlnd_malloc, - _mysqlnd_calloc, - _mysqlnd_realloc, - _mysqlnd_free, - _mysqlnd_pestrndup, - _mysqlnd_pestrdup -#else - mysqlnd_zend_mm_emalloc, - mysqlnd_zend_mm_pemalloc, - mysqlnd_zend_mm_ecalloc, - mysqlnd_zend_mm_pecalloc, - mysqlnd_zend_mm_erealloc, - mysqlnd_zend_mm_perealloc, - mysqlnd_zend_mm_efree, - mysqlnd_zend_mm_pefree, - mysqlnd_zend_mm_malloc, - mysqlnd_zend_mm_calloc, - mysqlnd_zend_mm_realloc, - mysqlnd_zend_mm_free, - mysqlnd_zend_mm_pestrndup, - mysqlnd_zend_mm_pestrdup -#endif -}; - - - static const char * const mysqlnd_debug_default_trace_file = "/tmp/mysqlnd.trace"; #ifdef ZTS @@ -1046,6 +992,7 @@ char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_ME } /* }}} */ +#if MYSQLND_DEBUG_MEMORY /* {{{ mysqlnd_zend_mm_emalloc */ static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D) @@ -1158,6 +1105,46 @@ static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persist } /* }}} */ +#endif + + +#define MYSQLND_DEBUG_MEMORY 1 + +struct st_mysqlnd_allocator_methods mysqlnd_allocator = +{ +#if MYSQLND_DEBUG_MEMORY + _mysqlnd_emalloc, + _mysqlnd_pemalloc, + _mysqlnd_ecalloc, + _mysqlnd_pecalloc, + _mysqlnd_erealloc, + _mysqlnd_perealloc, + _mysqlnd_efree, + _mysqlnd_pefree, + _mysqlnd_malloc, + _mysqlnd_calloc, + _mysqlnd_realloc, + _mysqlnd_free, + _mysqlnd_pestrndup, + _mysqlnd_pestrdup +#else + mysqlnd_zend_mm_emalloc, + mysqlnd_zend_mm_pemalloc, + mysqlnd_zend_mm_ecalloc, + mysqlnd_zend_mm_pecalloc, + mysqlnd_zend_mm_erealloc, + mysqlnd_zend_mm_perealloc, + mysqlnd_zend_mm_efree, + mysqlnd_zend_mm_pefree, + mysqlnd_zend_mm_malloc, + mysqlnd_zend_mm_calloc, + mysqlnd_zend_mm_realloc, + mysqlnd_zend_mm_free, + mysqlnd_zend_mm_pestrndup, + mysqlnd_zend_mm_pestrdup +#endif +}; + /* Follows code borrowed from zend_builtin_functions.c because the functions there are static */ |