From 89036b9f8a0824ead608bf1ff8120f5f7101031e Mon Sep 17 00:00:00 2001 From: Michael Widenius <monty@askmonty.org> Date: Fri, 17 Aug 2012 10:01:19 +0300 Subject: [PATCH] Fixed compiler warnings Fixed error in test that caused following tests to fail extra/yassl/taocrypt/src/dsa.cpp: Fixed compiler warning by adding cast mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test: We have to first test for have_debug_sync to not start master wrongly plugin/auth_pam/auth_pam.c: Fixed compiler warning sql/sys_vars.h: Fixed compiler warning (Sys_var_max_user_conn is now signed) support-files/compiler_warnings.supp: Don't give warnings for auth_pam.c (Tried to fix it by changing the code, but could not find an easy way to do that on solaris) --- extra/yassl/taocrypt/src/dsa.cpp | 2 +- mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test | 2 +- plugin/auth_pam/auth_pam.c | 2 +- sql/sys_vars.h | 2 +- support-files/compiler_warnings.supp | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/extra/yassl/taocrypt/src/dsa.cpp b/extra/yassl/taocrypt/src/dsa.cpp index a4e9c9503e7..7b882b10cd1 100644 --- a/extra/yassl/taocrypt/src/dsa.cpp +++ b/extra/yassl/taocrypt/src/dsa.cpp @@ -184,7 +184,7 @@ word32 DSA_Signer::Sign(const byte* sha_digest, byte* sig, s_ = (kInv * (H + x*r_)) % q; if (!(!!r_ && !!s_)) - return -1; + return (word32) -1; int rSz = r_.ByteCount(); diff --git a/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test index dfcec6758b3..3eaff761108 100644 --- a/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test +++ b/mysql-test/suite/rpl/t/rpl_start_slave_deadlock_sys_vars.test @@ -1,5 +1,5 @@ -source include/master-slave.inc; source include/have_debug_sync.inc; +source include/master-slave.inc; --echo # connection: slave connection slave; diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c index d8211294910..4f549142e72 100644 --- a/plugin/auth_pam/auth_pam.c +++ b/plugin/auth_pam/auth_pam.c @@ -107,7 +107,7 @@ static int conv(int n, const struct pam_message **msg, #define DO(X) if ((status = (X)) != PAM_SUCCESS) goto end -#ifdef SOLARIS +#if defined(SOLARIS) || defined(__sun) typedef void** pam_get_item_3_arg; #else typedef const void** pam_get_item_3_arg; diff --git a/sql/sys_vars.h b/sql/sys_vars.h index 5bec56a78cc..21bebcd762c 100644 --- a/sql/sys_vars.h +++ b/sql/sys_vars.h @@ -959,7 +959,7 @@ public: Sys_var_max_user_conn(const char *name_arg, const char *comment, int flag_args, ptrdiff_t off, size_t size, CMD_LINE getopt, - uint min_val, uint max_val, uint def_val, + int min_val, int max_val, int def_val, uint block_size, PolyLock *lock=0, enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG, on_check_function on_check_func=0, diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 1168770d624..0901b35d78c 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -163,6 +163,7 @@ mySTL/algorithm\.hpp: is used uninitialized in this function # .*/my_config\.h : _FILE_OFFSET_BITS /usr/include/sys/feature_tests.h : this is the location of the previous definition +*auth_pam\.c : initialization from incompatible pointer type : 100-200 # # Unexplanable (?) stuff