summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-02-22 16:59:57 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-02-22 16:59:57 +0200
commit50bd97a9436afe01606ad0cef323e7bda4d77e9b (patch)
tree260c15e9d6f383c404ea95e9e68ef07f0eba2cea /extra
parente5706080f08eea5a5e67f85778307fd2cc021861 (diff)
downloadmariadb-git-50bd97a9436afe01606ad0cef323e7bda4d77e9b.tar.gz
Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases) client/mysqldump.c: Fixed compiler warnings from 'max' build client/mysqltest.c: Removed compiler warnings cmd-line-utils/readline/xmalloc.c: Fixed compiler warnings from 'max' build extra/comp_err.c: Fixed compiler warnings from 'max' build extra/yassl/include/openssl/ssl.h: Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit extra/yassl/include/socket_wrapper.hpp: Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit extra/yassl/src/ssl.cpp: Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit extra/yassl/taocrypt/src/integer.cpp: Fixed compiler warnings include/my_global.h: Added my_offsetof() macro from 5.1 to get rid of compiler warnings innobase/include/ut0byte.ic: Fixed compiler warnings on win64 innobase/include/ut0ut.ic: Fixed compiler warnings on win64 libmysql/libmysql.def: Fixed compiler warnings on win64 myisam/mi_packrec.c: Fixed compiler warnings on win64 myisam/myisamchk.c: Fixed compiler warnings from 'max' build mysys/base64.c: Fixed compiler warnings on win64 mysys/mf_keycache.c: Fixed compiler warnings from 'max' build mysys/my_getopt.c: Fixed compiler warnings from 'max' build mysys/my_init.c: Fixed compiler warnings from 'max' build mysys/my_thr_init.c: Fixed compiler warnings mysys/ptr_cmp.c: Fixed compiler warnings from 'max' build ndb/include/kernel/signaldata/DictTabInfo.hpp: Fixed compiler warnings server-tools/instance-manager/mysql_connection.cc: Fixed compiler warnings server-tools/instance-manager/mysqlmanager.cc: Fixed compiler warnings sql/filesort.cc: Initalize variable that was used unitialized in error conditions sql/ha_berkeley.cc: Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64 sql/ha_berkeley.h: Moved get_auto_primary_key() to ha_berkeley.cc sql/ha_innodb.cc: Fixed compiler warnings sql/item.cc: Fixed compiler warnings from 'max' build sql/item_timefunc.cc: Fixed compiler warnings sql/mysqld.cc: Fixed compiler warnings sql/sql_acl.cc: Fixed compiler warnings from 'max' build sql/sql_base.cc: Fixed compiler warnings from 'max' build sql/sql_insert.cc: Initialize variable that may be used unitialized on error conditions (not fatal) sql/sql_prepare.cc: Fixed compiler warnings from 'max' build sql/sql_select.cc: Fixed compiler warnings sql/sql_show.cc: Fixed compiler warnings sql/udf_example.def: Fixed compiler warnings on win64 sql/unireg.cc: Initialize variable that may be used unitialized on error conditions strings/ctype-ucs2.c: Fixed compiler warnings strings/ctype-utf8.c: Fixed compiler warnings strings/decimal.c: Fixed compiler warnings support-files/compiler_warnings.supp: Ignore warnings from sql_yacc.cc that are hard to remove Ignore some not important warnings from windows 64 bit build tools/mysqlmanager.c: Fixed compiler warnings
Diffstat (limited to 'extra')
-rw-r--r--extra/comp_err.c4
-rw-r--r--extra/yassl/include/openssl/ssl.h8
-rw-r--r--extra/yassl/include/socket_wrapper.hpp6
-rw-r--r--extra/yassl/src/ssl.cpp2
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp2
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
{