mysql2redis icon indicating copy to clipboard operation
mysql2redis copied to clipboard

SOMETHING WRONG WITH THE MAKE COMMAND

Open zhongyuhai opened this issue 9 years ago • 0 comments
trafficstars

base on MySQL-server-5.6.32-1.linux_glibc2.5.i386.rpm , when I make the mysql2redis,the below message showed:

[root@localhost mysql2redis]# make gcc -Werror -O2 -g /usr/bin/mysql_config --include -I/usr/local/include -I/usr/local/apr/include -I./ -I. -fPIC -shared -rdynamic lib_mysqludf_redis.c -lhiredis -L"/usr/lib64/mysql/plugin" -L/usr/local/apr/lib -lapr-1 -laprutil-1 -o lib_mysqludf_redis_v2.so cc1: warnings being treated as errors In file included from lib_mysqludf_redis.h:26, from lib_mysqludf_redis.c:5: /usr/include/mysql/m_string.h: In function ‘skip_trailing_space’: /usr/include/mysql/m_string.h:261: error: cast from pointer to integer of different size /usr/include/mysql/m_string.h:261: error: cast to pointer from integer of different size /usr/include/mysql/m_string.h:263: error: cast from pointer to integer of different size /usr/include/mysql/m_string.h:263: error: cast to pointer from integer of different size /usr/include/mysql/m_string.h:265: error: cast from pointer to integer of different size make: *** [compile] Error 1

the function ‘skip_trailing_space’ like below:

static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) { const uchar *end= ptr + len;

if (len > 20) { const uchar *end_words= (const uchar *)(intptr) (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); const uchar *start_words= (const uchar *)(intptr) ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);

DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
  while (end > end_words && end[-1] == 0x20)
    end--;
  if (end[-1] == 0x20 && start_words < end_words)
    while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
      end -= SIZEOF_INT;
}

} while (end > ptr && end[-1] == 0x20) end--; return (end); }

THANKS FOR HELP.

zhongyuhai avatar Jul 31 '16 03:07 zhongyuhai