Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOMETHING WRONG WITH THE MAKE COMMAND #9

Open
zhongyuhai opened this issue Jul 31, 2016 · 0 comments
Open

SOMETHING WRONG WITH THE MAKE COMMAND #9

zhongyuhai opened this issue Jul 31, 2016 · 0 comments

Comments

@zhongyuhai
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant