diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-09-03 15:20:22 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-09-03 15:20:22 +0200 |
commit | 592379fc9592821b4acb65f3694b517f22621af4 (patch) | |
tree | 9e6b76710856b281c2a9ca9692f0e5252b2c0ba7 /extra/yassl | |
parent | 03db11cfdaabc27b57de342eb4974195745f90d6 (diff) | |
download | mariadb-git-592379fc9592821b4acb65f3694b517f22621af4.tar.gz |
Fix most Compiler warnings seen in buildbot.
Add suppressions for a few warnings that cannot be meaningfully fixed by
MariaDB developers.
Changes for XtraDB, PBXT, and YaSSL also submitted upstream.
Also add a `ccfilter` wrapper that can be used to filter out suppressed warnings in a
local build (to check that new warnings are not introduced).
client/mysqlbinlog.cc:
Fix compiler warnings.
config/ac-macros/misc.m4:
Fix wrong naming, autoconfig requires _cv_ in cached names.
extra/yassl/include/yassl_int.hpp:
Fix compiler warnings.
extra/yassl/src/handshake.cpp:
Fix compiler warnings.
extra/yassl/src/yassl_imp.cpp:
Fix compiler warnings.
extra/yassl/src/yassl_int.cpp:
Fix compiler warnings.
extra/yassl/taocrypt/include/modes.hpp:
Fix compiler warnings.
extra/yassl/taocrypt/src/asn.cpp:
Fix compiler warnings.
mysys/my_compress.c:
Fix compiler warnings.
sql/mysqld.cc:
Fix compiler warnings.
sql/strfunc.cc:
Fix compiler warnings.
storage/pbxt/src/discover_xt.cc:
Fix compiler warnings.
storage/xtradb/fil/fil0fil.c:
Fix compiler warnings.
storage/xtradb/mtr/mtr0mtr.c:
Fix compiler warnings.
storage/xtradb/srv/srv0srv.c:
Fix compiler warnings.
storage/xtradb/srv/srv0start.c:
Fix compiler warnings.
strings/decimal.c:
Fix compiler warnings.
support-files/ccfilter:
Add helper for suppressing compiler warnings in local developer source tree.
Allows to check for not introducing new warnings into Buildbot without having to actually
run the build through Buildbot.
support-files/compiler_warnings.supp:
Suppress a few warnings that cannot be meaningfully fixed in source code.
Diffstat (limited to 'extra/yassl')
-rw-r--r-- | extra/yassl/include/yassl_int.hpp | 2 | ||||
-rw-r--r-- | extra/yassl/src/handshake.cpp | 6 | ||||
-rw-r--r-- | extra/yassl/src/yassl_imp.cpp | 3 | ||||
-rw-r--r-- | extra/yassl/src/yassl_int.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/include/modes.hpp | 3 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/asn.cpp | 9 |
6 files changed, 16 insertions, 9 deletions
diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp index d18dc41860c..12489468e6b 100644 --- a/extra/yassl/include/yassl_int.hpp +++ b/extra/yassl/include/yassl_int.hpp @@ -441,7 +441,7 @@ public: const Ciphers& GetCiphers() const; const DH_Parms& GetDH_Parms() const; const Stats& GetStats() const; - const VerifyCallback getVerifyCallback() const; + VerifyCallback getVerifyCallback() const; pem_password_cb GetPasswordCb() const; void* GetUserData() const; bool GetSessionCacheOff() const; diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index 262b5cb3b8b..a95fa5df4f8 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -789,7 +789,7 @@ void processReply(SSL& ssl) { if (ssl.GetError()) return; - if (DoProcessReply(ssl)) + if (DoProcessReply(ssl)) { // didn't complete process if (!ssl.getSocket().IsNonBlocking()) { // keep trying now, blocking ok @@ -799,6 +799,7 @@ void processReply(SSL& ssl) else // user will have try again later, non blocking ssl.SetError(YasslError(SSL_ERROR_WANT_READ)); + } } @@ -872,11 +873,12 @@ void sendServerKeyExchange(SSL& ssl, BufferOutput buffer) // send change cipher void sendChangeCipher(SSL& ssl, BufferOutput buffer) { - if (ssl.getSecurity().get_parms().entity_ == server_end) + if (ssl.getSecurity().get_parms().entity_ == server_end) { if (ssl.getSecurity().get_resuming()) ssl.verifyState(clientKeyExchangeComplete); else ssl.verifyState(clientFinishedComplete); + } if (ssl.GetError()) return; ChangeCipherSpec ccs; diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index 20dfe50f132..d0eabce7bc9 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1304,7 +1304,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl) else ssl.useSecurity().use_connection().sessionID_Set_ = false; - if (ssl.getSecurity().get_resuming()) + if (ssl.getSecurity().get_resuming()) { if (memcmp(session_id_, ssl.getSecurity().get_resume().GetID(), ID_LEN) == 0) { ssl.set_masterSecret(ssl.getSecurity().get_resume().GetSecret()); @@ -1319,6 +1319,7 @@ void ServerHello::Process(input_buffer&, SSL& ssl) ssl.useSecurity().set_resuming(false); ssl.useLog().Trace("server denied resumption"); } + } if (ssl.CompressionOn() && !compression_method_) ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index b7f91d72166..8e4a9aa95ec 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1833,7 +1833,7 @@ SSL_CTX::GetCA_List() const } -const VerifyCallback SSL_CTX::getVerifyCallback() const +VerifyCallback SSL_CTX::getVerifyCallback() const { return verifyCallback_; } diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp index d1ebce7568b..9846527d116 100644 --- a/extra/yassl/taocrypt/include/modes.hpp +++ b/extra/yassl/taocrypt/include/modes.hpp @@ -95,11 +95,12 @@ inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz) { if (mode_ == ECB) ECB_Process(out, in, sz); - else if (mode_ == CBC) + else if (mode_ == CBC) { if (dir_ == ENCRYPTION) CBC_Encrypt(out, in, sz); else CBC_Decrypt(out, in, sz); + } } diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index 3b1c1c2136a..0e95ecd885f 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -780,11 +780,12 @@ void CertDecoder::GetDate(DateType dt) memcpy(date, source_.get_current(), length); source_.advance(length); - if (!ValidateDate(date, b, dt) && verify_) + if (!ValidateDate(date, b, dt) && verify_) { if (dt == BEFORE) source_.SetError(BEFORE_DATE_E); else source_.SetError(AFTER_DATE_E); + } // save for later use if (dt == BEFORE) { @@ -1061,7 +1062,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) return 0; } word32 rLen = GetLength(source); - if (rLen != 20) + if (rLen != 20) { if (rLen == 21) { // zero at front, eat source.next(); --rLen; @@ -1074,6 +1075,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) source.SetError(DSA_SZ_E); return 0; } + } memcpy(decoded, source.get_buffer() + source.get_index(), rLen); source.advance(rLen); @@ -1083,7 +1085,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) return 0; } word32 sLen = GetLength(source); - if (sLen != 20) + if (sLen != 20) { if (sLen == 21) { source.next(); // zero at front, eat --sLen; @@ -1096,6 +1098,7 @@ word32 DecodeDSA_Signature(byte* decoded, const byte* encoded, word32 sz) source.SetError(DSA_SZ_E); return 0; } + } memcpy(decoded + rLen, source.get_buffer() + source.get_index(), sLen); source.advance(sLen); |