Commit 33d1689f authored by Alexander Barkov's avatar Alexander Barkov

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
parent 35a879d0
......@@ -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)
......
......@@ -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) */
......
......@@ -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 */
......
......@@ -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
/**************************************************************************/
......
......@@ -14,6 +14,7 @@
/***********************************************************************/
#include <stdio.h>
#include "resource.h"
#include "rcmsg.h"
char *GetMsgid(int id)
{
......
#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__ */
......@@ -75,7 +75,6 @@
#include "sql_string.h"
extern "C" char *GetMsgid(int id);
extern "C" int trace;
/***********************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment