diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2007-02-22 16:59:57 +0200 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2007-02-22 16:59:57 +0200 |
commit | e5cc397f33e6c9916043742194bbdc809e118905 (patch) | |
tree | 260c15e9d6f383c404ea95e9e68ef07f0eba2cea /extra | |
parent | 6946fa682fd6b0f90f17f1bd2bf1bdc9579c0fca (diff) | |
download | mariadb-git-e5cc397f33e6c9916043742194bbdc809e118905.tar.gz |
Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases)
Diffstat (limited to 'extra')
-rw-r--r-- | extra/comp_err.c | 4 | ||||
-rw-r--r-- | extra/yassl/include/openssl/ssl.h | 8 | ||||
-rw-r--r-- | extra/yassl/include/socket_wrapper.hpp | 6 | ||||
-rw-r--r-- | extra/yassl/src/ssl.cpp | 2 | ||||
-rw-r--r-- | extra/yassl/taocrypt/src/integer.cpp | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c index df6df1678a6..a9bda6e3124 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -41,7 +41,9 @@ static char *NAMEFILE= (char*) "mysqld_ername.h"; static char *STATEFILE= (char*) "sql_state.h"; static char *TXTFILE= (char*) "../sql/share/errmsg.txt"; static char *DATADIRECTORY= (char*) "../sql/share/"; +#ifndef DBUG_OFF static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace"; +#endif /* Header for errmsg.sys files */ uchar file_head[]= { 254, 254, 2, 1 }; @@ -402,6 +404,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error, int rcount= 0; DBUG_ENTER("parse_input_file"); + *top_error= 0; + *top_lang= 0; if (!(file= my_fopen(file_name, O_RDONLY | O_SHARE, MYF(MY_WME)))) DBUG_RETURN(0); diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 16110c52f43..d0c49d6816c 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -33,7 +33,6 @@ #include "opensslv.h" /* for version number */ #include "rsa.h" - #define YASSL_VERSION "1.5.8" @@ -190,11 +189,16 @@ enum { /* ERR Constants */ EVP_R_BAD_DECRYPT = 2 }; +#ifdef WIN + typedef SOCKET socket_t; +#else + typedef int socket_t; +#endif SSL_CTX* SSL_CTX_new(SSL_METHOD*); SSL* SSL_new(SSL_CTX*); -int SSL_set_fd (SSL*, int); +int SSL_set_fd (SSL*, socket_t); int SSL_connect(SSL*); int SSL_write(SSL*, const void*, int); int SSL_read(SSL*, void*, int); diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index 308704c2af0..de28778ead9 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -38,16 +38,14 @@ #include <netinet/in.h> #include <arpa/inet.h> #endif +#include "openssl/ssl.h" /* for socket_t */ namespace yaSSL { typedef unsigned int uint; -#ifdef _WIN32 - typedef SOCKET socket_t; -#else - typedef int socket_t; +#ifndef _WIN32 const socket_t INVALID_SOCKET = -1; const int SD_RECEIVE = 0; const int SD_SEND = 1; diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 837121c249d..1f9d0dd4020 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -229,7 +229,7 @@ void SSL_free(SSL* ssl) } -int SSL_set_fd(SSL* ssl, int fd) +int SSL_set_fd(SSL* ssl, socket_t fd) { ssl->useSocket().set_fd(fd); return SSL_SUCCESS; diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 419783403ea..84255aa8544 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= (1 << (n % WORD_BITS)); + r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS)); } else { |