diff options
author | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
---|---|---|
committer | Ignacio Galarza <iggy@mysql.com> | 2009-02-10 17:47:54 -0500 |
commit | 2b85c64d65385297f4a90265ae47cb298891dd5f (patch) | |
tree | 6d7f0073845344099159d82b6dfe2e017670b700 /extra/yassl | |
parent | 1a7b0ec920bb496019dbbddfabd463f498af34c6 (diff) | |
download | mariadb-git-2b85c64d65385297f4a90265ae47cb298891dd5f.tar.gz |
Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
Diffstat (limited to 'extra/yassl')
-rw-r--r-- | extra/yassl/src/buffer.cpp | 4 | ||||
-rw-r--r-- | extra/yassl/src/cert_wrapper.cpp | 14 | ||||
-rw-r--r-- | extra/yassl/src/ssl.cpp | 6 | ||||
-rw-r--r-- | extra/yassl/src/yassl_imp.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/src/yassl_int.cpp | 12 | ||||
-rw-r--r-- | extra/yassl/taocrypt/include/block.hpp | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/algebra.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/asn.cpp | 2 |
8 files changed, 22 insertions, 22 deletions
diff --git a/extra/yassl/src/buffer.cpp b/extra/yassl/src/buffer.cpp index 0c3f23b0cb8..66107dbe0a9 100644 --- a/extra/yassl/src/buffer.cpp +++ b/extra/yassl/src/buffer.cpp @@ -106,7 +106,7 @@ void input_buffer::add_size(uint i) uint input_buffer::get_capacity() const { - return end_ - buffer_; + return (uint) (end_ - buffer_); } @@ -223,7 +223,7 @@ uint output_buffer::get_size() const uint output_buffer::get_capacity() const { - return end_ - buffer_; + return (uint) (end_ - buffer_); } diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp index 5eacf9083f9..8caca8f9649 100644 --- a/extra/yassl/src/cert_wrapper.cpp +++ b/extra/yassl/src/cert_wrapper.cpp @@ -236,7 +236,7 @@ uint CertManager::get_privateKeyLength() const int CertManager::Validate() { CertList::reverse_iterator last = peerList_.rbegin(); - int count = peerList_.size(); + size_t count= peerList_.size(); while ( count > 1 ) { TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length()); @@ -269,13 +269,13 @@ int CertManager::Validate() else peerKeyType_ = dsa_sa_algo; - int iSz = strlen(cert.GetIssuer()) + 1; - int sSz = strlen(cert.GetCommonName()) + 1; - int bSz = strlen(cert.GetBeforeDate()) + 1; - int aSz = strlen(cert.GetAfterDate()) + 1; + size_t iSz= strlen(cert.GetIssuer()) + 1; + size_t sSz= strlen(cert.GetCommonName()) + 1; + size_t bSz= strlen(cert.GetBeforeDate()) + 1; + size_t aSz= strlen(cert.GetAfterDate()) + 1; peerX509_ = NEW_YS X509(cert.GetIssuer(), iSz, cert.GetCommonName(), - sSz, cert.GetBeforeDate(), bSz, - cert.GetAfterDate(), aSz); + sSz, cert.GetBeforeDate(), (int) bSz, + cert.GetAfterDate(), (int) aSz); } return 0; } diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index f09a43be56e..781cfa36a70 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -604,13 +604,13 @@ char* X509_NAME_oneline(X509_NAME* name, char* buffer, int sz) { if (!name->GetName()) return buffer; - int len = strlen(name->GetName()) + 1; - int copySz = min(len, sz); + size_t len= strlen(name->GetName()) + 1; + int copySz = min((int) len, sz); if (!buffer) { buffer = (char*)malloc(len); if (!buffer) return buffer; - copySz = len; + copySz = (int) len; } if (copySz == 0) diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index b43d9c27355..4ee0fb99d3a 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -532,7 +532,7 @@ void Parameters::SetCipherNames() for (int j = 0; j < suites; j++) { int index = suites_[j*2 + 1]; // every other suite is suite id - int len = strlen(cipher_names[index]) + 1; + size_t len = strlen(cipher_names[index]) + 1; strncpy(cipher_list_[pos++], cipher_names[index], len); } cipher_list_[pos][0] = 0; diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp index 0b6cb89e77e..ba8ee8f66ab 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -1034,7 +1034,7 @@ void SSL::fillData(Data& data) { if (GetError()) return; uint dataSz = data.get_length(); // input, data size to fill - uint elements = buffers_.getData().size(); + size_t elements = buffers_.getData().size(); data.set_length(0); // output, actual data filled dataSz = min(dataSz, bufferedData()); @@ -1064,7 +1064,7 @@ void SSL::PeekData(Data& data) { if (GetError()) return; uint dataSz = data.get_length(); // input, data size to fill - uint elements = buffers_.getData().size(); + size_t elements = buffers_.getData().size(); data.set_length(0); // output, actual data filled dataSz = min(dataSz, bufferedData()); @@ -1098,7 +1098,7 @@ void SSL::flushBuffer() buffers_.getHandShake().end(), SumBuffer()).total_; output_buffer out(sz); - uint elements = buffers_.getHandShake().size(); + size_t elements = buffers_.getHandShake().size(); for (uint i = 0; i < elements; i++) { output_buffer* front = buffers_.getHandShake().front(); @@ -1906,7 +1906,7 @@ bool SSL_CTX::SetCipherList(const char* list) int idx = 0; for(;;) { - int len; + size_t len; prev = haystack; haystack = strstr(haystack, needle); @@ -2354,10 +2354,10 @@ ASN1_STRING* X509_NAME::GetEntry(int i) memcpy(entry_.data, &name_[i], sz_ - i); if (entry_.data[sz_ -i - 1]) { entry_.data[sz_ - i] = 0; - entry_.length = sz_ - i; + entry_.length = (int) (sz_ - i); } else - entry_.length = sz_ - i - 1; + entry_.length = (int) (sz_ - i - 1); entry_.type = 0; return &entry_; diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp index 529a91eee08..bb34db5e07f 100644 --- a/extra/yassl/taocrypt/include/block.hpp +++ b/extra/yassl/taocrypt/include/block.hpp @@ -78,7 +78,7 @@ typename A::pointer StdReallocate(A& a, T* p, typename A::size_type oldSize, if (preserve) { A b = A(); typename A::pointer newPointer = b.allocate(newSize, 0); - memcpy(newPointer, p, sizeof(T) * min(oldSize, newSize)); + memcpy(newPointer, p, sizeof(T) * min((word32) oldSize, (word32) newSize)); a.deallocate(p, oldSize); STL::swap(a, b); return newPointer; diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp index cb597c41552..c221ce3d6cb 100644 --- a/extra/yassl/taocrypt/src/algebra.cpp +++ b/extra/yassl/taocrypt/src/algebra.cpp @@ -288,7 +288,7 @@ void AbstractGroup::SimultaneousMultiply(Integer *results, const Integer &base, r = buckets[i][buckets[i].size()-1]; if (buckets[i].size() > 1) { - for (int j = buckets[i].size()-2; j >= 1; j--) + for (int j= (unsigned int) (buckets[i].size()) - 2; j >= 1; j--) { Accumulate(buckets[i][j], buckets[i][j+1]); Accumulate(r, buckets[i][j]); diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index a06ab658c7b..3b1c1c2136a 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -213,7 +213,7 @@ void PublicKey::AddToEnd(const byte* data, word32 len) Signer::Signer(const byte* k, word32 kSz, const char* n, const byte* h) : key_(k, kSz) { - int sz = strlen(n); + size_t sz = strlen(n); memcpy(name_, n, sz); name_[sz] = 0; |