summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-05-13 15:57:49 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-05-13 15:57:49 +0400
commit33d1689fcf252d29a24cf05ca88c6711d682fb2e (patch)
tree537cf0da48debf5b72516105bf0e1066ff7c7a2a
parent35a879d06dbd58f4ae8203419915d7de67e821a9 (diff)
downloadmariadb-git-33d1689fcf252d29a24cf05ca88c6711d682fb2e.tar.gz
Fixing compiler warnings ("no previous declaration for ...")
added: storage/connect/rcmsg.h modified: storage/connect/CMakeLists.txt storage/connect/odbconn.cpp storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/rcmsg.c storage/connect/tabodbc.cpp
-rw-r--r--storage/connect/CMakeLists.txt5
-rw-r--r--storage/connect/odbconn.cpp4
-rw-r--r--storage/connect/plgdbutl.cpp2
-rw-r--r--storage/connect/plugutil.c2
-rw-r--r--storage/connect/rcmsg.c1
-rw-r--r--storage/connect/rcmsg.h15
-rw-r--r--storage/connect/tabodbc.cpp1
7 files changed, 20 insertions, 10 deletions
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 81dd8c77b67..6cae17c4dd9 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -18,7 +18,7 @@ SET(CONNECT_PLUGIN_DYNAMIC "connect")
SET(CONNECT_SOURCES
ha_connect.cc connect.cc user_connect.cc mycat.cc
-fmdlex.c osutil.c plugutil.c rcmsg.c
+fmdlex.c osutil.c plugutil.c rcmsg.c rcmsg.h
csort.cpp maputil.cpp plgdbutl.cpp
colblk.cpp reldef.cpp tabcol.cpp table.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp
@@ -48,7 +48,6 @@ IF(UNIX)
# Bar: -Wfatal-errors removed (does not present in gcc on solaris10)
if(WITH_WARNINGS)
add_definitions(-Wall -Wextra -Wmissing-declarations)
- add_definitions(-Wno-non-virtual-dtor)
message(STATUS "CONNECT: GCC: All warnings enabled")
else()
add_definitions(-Wall -Wmissing-declarations)
@@ -64,13 +63,11 @@ IF(UNIX)
# add_definitions(-Wno-int-to-pointer-cast)
# Bar: -Wno-narrowing commented (does not present in gcc on solaris10)
# add_definitions(-Wno-narrowing)
- add_definitions(-Wno-non-virtual-dtor)
# This switch is for pure C only:
# add_definitions(-Wno-implicit-function-declaration)
# These switches are for C++ only
# add_definitions(-Wno-reorder)
-# add_definitions(-Wno-delete-non-virtual-dtor)
message(STATUS "CONNECT: GCC: Some warnings disabled")
endif(WITH_WARNINGS)
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 881e554163e..14b5f582962 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -48,9 +48,7 @@
/***********************************************************************/
#pragma comment(lib, "odbc32.lib")
extern "C" HINSTANCE s_hModule; // Saved module handle
-#else // !WIN32
-extern "C" int GetRcString(int id, char *buf, int bufsize);
-#endif // !WIN32
+#endif // WIN32
/***********************************************************************/
/* Some macro's (should be defined elsewhere to be more accessible) */
diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp
index d0f3896bc4f..598075ac52a 100644
--- a/storage/connect/plgdbutl.cpp
+++ b/storage/connect/plgdbutl.cpp
@@ -67,6 +67,7 @@
#include "xtable.h" // header of TBX, TDB and TDBASE classes
#include "tabcol.h" // header of XTAB and COLUMN classes
#include "valblk.h"
+#include "rcmsg.h"
/***********************************************************************/
/* Macro or external routine definition */
@@ -129,7 +130,6 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool);
void CloseXML2File(PGLOBAL, PFBLOCK, bool);
#endif // LIBXML2_SUPPORT
-extern "C" int GetRcString(int id, char *buf, int bufsize);
/***********************************************************************/
/* Routines for file IO with error reporting to g->Message */
diff --git a/storage/connect/plugutil.c b/storage/connect/plugutil.c
index 2c7eaa893b6..12810d74284 100644
--- a/storage/connect/plugutil.c
+++ b/storage/connect/plugutil.c
@@ -107,7 +107,7 @@ ACTIVITY defActivity = { /* Describes activity and language */
#endif // XMSG || NEWMSG
#if defined(UNIX) || defined(UNIV_LINUX)
-int GetRcString(int id, char *buf, int bufsize);
+#include "rcmsg.h"
#endif // UNIX
/**************************************************************************/
diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c
index e1a71cde9c6..0c63fd55242 100644
--- a/storage/connect/rcmsg.c
+++ b/storage/connect/rcmsg.c
@@ -14,6 +14,7 @@
/***********************************************************************/
#include <stdio.h>
#include "resource.h"
+#include "rcmsg.h"
char *GetMsgid(int id)
{
diff --git a/storage/connect/rcmsg.h b/storage/connect/rcmsg.h
new file mode 100644
index 00000000000..b22e77f5175
--- /dev/null
+++ b/storage/connect/rcmsg.h
@@ -0,0 +1,15 @@
+#ifndef __RCMSG_H__
+#define __RCMSG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+char *GetMsgid(int id);
+int GetRcString(int id, char *buf, int bufsize);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __RCMSG_H__ */
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index 5bbc9effa92..909fcda4abf 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -75,7 +75,6 @@
#include "sql_string.h"
-extern "C" char *GetMsgid(int id);
extern "C" int trace;
/***********************************************************************/