mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -18,7 +18,7 @@ SET(CONNECT_PLUGIN_DYNAMIC "connect")
|
|||||||
|
|
||||||
SET(CONNECT_SOURCES
|
SET(CONNECT_SOURCES
|
||||||
ha_connect.cc connect.cc user_connect.cc mycat.cc
|
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
|
csort.cpp maputil.cpp plgdbutl.cpp
|
||||||
colblk.cpp reldef.cpp tabcol.cpp table.cpp
|
colblk.cpp reldef.cpp tabcol.cpp table.cpp
|
||||||
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.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)
|
# Bar: -Wfatal-errors removed (does not present in gcc on solaris10)
|
||||||
if(WITH_WARNINGS)
|
if(WITH_WARNINGS)
|
||||||
add_definitions(-Wall -Wextra -Wmissing-declarations)
|
add_definitions(-Wall -Wextra -Wmissing-declarations)
|
||||||
add_definitions(-Wno-non-virtual-dtor)
|
|
||||||
message(STATUS "CONNECT: GCC: All warnings enabled")
|
message(STATUS "CONNECT: GCC: All warnings enabled")
|
||||||
else()
|
else()
|
||||||
add_definitions(-Wall -Wmissing-declarations)
|
add_definitions(-Wall -Wmissing-declarations)
|
||||||
@@ -64,13 +63,11 @@ IF(UNIX)
|
|||||||
# add_definitions(-Wno-int-to-pointer-cast)
|
# add_definitions(-Wno-int-to-pointer-cast)
|
||||||
# Bar: -Wno-narrowing commented (does not present in gcc on solaris10)
|
# Bar: -Wno-narrowing commented (does not present in gcc on solaris10)
|
||||||
# add_definitions(-Wno-narrowing)
|
# add_definitions(-Wno-narrowing)
|
||||||
add_definitions(-Wno-non-virtual-dtor)
|
|
||||||
|
|
||||||
# This switch is for pure C only:
|
# This switch is for pure C only:
|
||||||
# add_definitions(-Wno-implicit-function-declaration)
|
# add_definitions(-Wno-implicit-function-declaration)
|
||||||
# These switches are for C++ only
|
# These switches are for C++ only
|
||||||
# add_definitions(-Wno-reorder)
|
# add_definitions(-Wno-reorder)
|
||||||
# add_definitions(-Wno-delete-non-virtual-dtor)
|
|
||||||
|
|
||||||
message(STATUS "CONNECT: GCC: Some warnings disabled")
|
message(STATUS "CONNECT: GCC: Some warnings disabled")
|
||||||
endif(WITH_WARNINGS)
|
endif(WITH_WARNINGS)
|
||||||
|
@@ -48,9 +48,7 @@
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
#pragma comment(lib, "odbc32.lib")
|
#pragma comment(lib, "odbc32.lib")
|
||||||
extern "C" HINSTANCE s_hModule; // Saved module handle
|
extern "C" HINSTANCE s_hModule; // Saved module handle
|
||||||
#else // !WIN32
|
#endif // WIN32
|
||||||
extern "C" int GetRcString(int id, char *buf, int bufsize);
|
|
||||||
#endif // !WIN32
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Some macro's (should be defined elsewhere to be more accessible) */
|
/* 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 "xtable.h" // header of TBX, TDB and TDBASE classes
|
||||||
#include "tabcol.h" // header of XTAB and COLUMN classes
|
#include "tabcol.h" // header of XTAB and COLUMN classes
|
||||||
#include "valblk.h"
|
#include "valblk.h"
|
||||||
|
#include "rcmsg.h"
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Macro or external routine definition */
|
/* Macro or external routine definition */
|
||||||
@@ -129,7 +130,6 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool);
|
|||||||
void CloseXML2File(PGLOBAL, PFBLOCK, bool);
|
void CloseXML2File(PGLOBAL, PFBLOCK, bool);
|
||||||
#endif // LIBXML2_SUPPORT
|
#endif // LIBXML2_SUPPORT
|
||||||
|
|
||||||
extern "C" int GetRcString(int id, char *buf, int bufsize);
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Routines for file IO with error reporting to g->Message */
|
/* Routines for file IO with error reporting to g->Message */
|
||||||
|
@@ -107,7 +107,7 @@ ACTIVITY defActivity = { /* Describes activity and language */
|
|||||||
#endif // XMSG || NEWMSG
|
#endif // XMSG || NEWMSG
|
||||||
|
|
||||||
#if defined(UNIX) || defined(UNIV_LINUX)
|
#if defined(UNIX) || defined(UNIV_LINUX)
|
||||||
int GetRcString(int id, char *buf, int bufsize);
|
#include "rcmsg.h"
|
||||||
#endif // UNIX
|
#endif // UNIX
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include "rcmsg.h"
|
||||||
|
|
||||||
char *GetMsgid(int id)
|
char *GetMsgid(int id)
|
||||||
{
|
{
|
||||||
|
15
storage/connect/rcmsg.h
Normal file
15
storage/connect/rcmsg.h
Normal file
@@ -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__ */
|
@@ -75,7 +75,6 @@
|
|||||||
|
|
||||||
#include "sql_string.h"
|
#include "sql_string.h"
|
||||||
|
|
||||||
extern "C" char *GetMsgid(int id);
|
|
||||||
extern "C" int trace;
|
extern "C" int trace;
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
Reference in New Issue
Block a user