summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-29 20:40:03 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-29 20:40:03 +0200
commit3794110f0215f0631107c2694dc0f1675a4bb520 (patch)
tree3400a806088335fffbb0c567d5ee7f40ca9a90ce /sql
parent949027f7c7b8704f2a329c85b8725af5158f3ade (diff)
downloadmariadb-git-3794110f0215f0631107c2694dc0f1675a4bb520.tar.gz
fix the build and compiler warnings (few of which were real bugs)
for "cmake ." builds
Diffstat (limited to 'sql')
-rw-r--r--sql/CMakeLists.txt6
-rw-r--r--sql/log.cc2
-rw-r--r--sql/mysqld.cc8
-rw-r--r--sql/table.cc2
4 files changed, 7 insertions, 11 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 7c97aea0c8d..1b06252d6a3 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -135,11 +135,11 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
${_PLATFORM} ${LIB_LOCATIONS} > mysqld.def
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
ADD_DEPENDENCIES(sql GenError)
- ENDIF()
-ENDIF()
+ ENDIF(MSVC)
+ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS)
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
-TARGET_LINK_LIBRARIES(mysqld sql mysys)
+TARGET_LINK_LIBRARIES(mysqld sql)
# Provide plugins with minimal set of libraries
SET(INTERFACE_LIBS ${LIBRT})
diff --git a/sql/log.cc b/sql/log.cc
index 2b248fa80ba..133ea907ea0 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -5035,7 +5035,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
*/
if (likely(is_open()))
{
- my_off_t my_org_b_tell;
+ my_off_t UNINIT_VAR(my_org_b_tell);
#ifdef HAVE_REPLICATION
/*
In the future we need to add to the following if tests like
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d9143e43e42..b2b066230bc 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2093,7 +2093,7 @@ static my_socket activate_tcp_port(uint port)
int error;
int arg;
char port_buf[NI_MAXSERV];
- my_socket ip_sock;
+ my_socket ip_sock= INVALID_SOCKET;
DBUG_ENTER("activate_tcp_port");
DBUG_PRINT("general",("IP Socket is %d",port));
@@ -2111,12 +2111,8 @@ static my_socket activate_tcp_port(uint port)
unireg_abort(1); /* purecov: tested */
}
- for (a= ai; a != NULL; a= a->ai_next)
- {
+ for (a= ai; a != NULL && ip_sock == INVALID_SOCKET; a= a->ai_next)
ip_sock= socket(a->ai_family, a->ai_socktype, a->ai_protocol);
- if (ip_sock != INVALID_SOCKET)
- break;
- }
if (ip_sock == INVALID_SOCKET)
{
diff --git a/sql/table.cc b/sql/table.cc
index 7bb5986f0f1..ab7ab37331a 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2073,7 +2073,7 @@ bool unpack_vcol_info_from_frm(THD *thd,
thd->stmt_arena= vcol_arena;
if (init_lex_with_single_table(thd, table, &lex))
- goto end;
+ goto err;
thd->lex->parse_vcol_expr= TRUE;