diff --git a/Changes b/Changes index 8ceb6a8..a79a71a 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,7 @@ $Id$ Fri, May 20 2016 JoungKyun.Kim - remove --with-mysql-plugins-dir option - add --with-mysql-config option + - fixed compile warning on gcc 4.8 (#3) Thu, May 19 2016 JoungKyun.Kim - fixed HAVE_LOG2 redefining warning on mariadb 10.1 diff --git a/src/my_aes.c b/src/my_aes.c index 50eaadf..ec808f1 100644 --- a/src/my_aes.c +++ b/src/my_aes.c @@ -254,7 +254,7 @@ int my_aes256_decrypt(const char *source, int source_length, char *dest, Size of buffer required to store encrypted data */ -int my_aes256_get_size(int source_length) +unsigned long my_aes256_get_size(int source_length) { DEBUG_SUB_FUNCTION_IN; DEBUG_SUB_FUNCTION_OUT; diff --git a/src/my_aes.h b/src/my_aes.h index 2006b70..d61c1e6 100644 --- a/src/my_aes.h +++ b/src/my_aes.h @@ -64,7 +64,7 @@ int my_aes256_decrypt(const char *source, int source_length, char *dest, returns - size of buffer required to store encrypted data */ -int my_aes256_get_size(int source_length); +unsigned long my_aes256_get_size(int source_length); C_MODE_END diff --git a/src/mysql_aes256.c b/src/mysql_aes256.c index eb35fc7..930d4a5 100644 --- a/src/mysql_aes256.c +++ b/src/mysql_aes256.c @@ -61,6 +61,7 @@ extern "C" { #include #include +#include #ifdef HAVE_DLOPEN @@ -201,7 +202,7 @@ EXPORT_API char * aes256_encrypt ( EXPORT_API my_bool aes256_decrypt_init (UDF_INIT * initid, UDF_ARGS * args, char * message) { DEBUG_FUNCTION_IN; - int blocks, i; + int i; if ( args->arg_count != 2 ) { sprintf ( @@ -226,7 +227,7 @@ EXPORT_API my_bool aes256_decrypt_init (UDF_INIT * initid, UDF_ARGS * args, char " - %dst Argument:\n" " - type : %d\n" " - data : %s\n" - " - length : %d\n", + " - length : %ld\n", i + 1, args->arg_type[i], args->args[i], args->lengths[i] ); @@ -252,7 +253,7 @@ EXPORT_API my_bool aes256_decrypt_init (UDF_INIT * initid, UDF_ARGS * args, char if ( (args->lengths[0] / AES256_BLOCK_SIZE) == 0 ) { sprintf ( message, - "CIPHERTEXT(%d) is longer than AES BLOCKSIZE(%d) (udf: %s)", + "CIPHERTEXT(%ld) is longer than AES BLOCKSIZE(%d) (udf: %s)", args->lengths[0], AES256_BLOCK_SIZE, __FUNCTION__ ); return false; @@ -294,7 +295,7 @@ EXPORT_API char * aes256_decrypt ( " - 1st Argument:\n" " + type : %d\n" " + data : %s\n" - " + length : %d\n", + " + length : %ld\n", args->arg_type[0], args->args[0], args->lengths[0] ); }