Commit 4712fb14 authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings

parent 4f412a57
......@@ -51,7 +51,10 @@ if (debug != NULL)
#if !defined(__BORLANDC__)
// Avoid warning C4291 by defining a matching dummy delete operator
void operator delete(void *, PGLOBAL, void *) {}
void operator delete(void *ptr,size_t size) {}
#endif
virtual ~BLOCK() {}
}; // end of class BLOCK
#endif // !BLOCK_DEFINED
......@@ -35,7 +35,7 @@ class DllExport CSORT {
public:
// Constructor
CSORT(bool cns, int th = THRESH, int mth = MTHRESH);
virtual ~CSORT() {}
protected:
// Implementation
/*********************************************************************/
......
......@@ -401,7 +401,7 @@ char *yytext;
#define YYSTATE ((yy_start-1)/2)
#undef YY_INPUT
#define YY_INPUT(buf,n,m) \
{n=(m<strlen(pp->Curp))?m:strlen(pp->Curp);strncpy(buf,pp->Curp,n);pp->Curp+=n;}
{n=((int) m< (int) strlen(pp->Curp))? (int) m: (int) strlen(pp->Curp);strncpy(buf,pp->Curp,n);pp->Curp+=n;}
#if defined(UNIX)
#undef yywrap
#define yywrap ddwrap
......@@ -458,7 +458,7 @@ YY_MALLOC_DECL
if ( yy_current_buffer->yy_is_interactive ) \
{ \
int c = getc( yyin ); \
result = c == EOF ? 0 : 1; \
result = c == (int) EOF ? 0 : 1; \
buf[0] = (char) c; \
} \
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
......
......@@ -152,7 +152,7 @@ static void PROFILE_CopyEntry( char *buffer, const char *value, uint len,
if (!p2)
continue; /* ignore it */
strncpy(env_val, p + 2, min(sizeof(env_val), (int)(p2-p)-1));
strncpy(env_val, p + 2, min((int) sizeof(env_val), (int)(p2-p)-1));
if ((env_p = getenv(env_val)) != NULL) {
int buffer_len;
......
......@@ -108,7 +108,7 @@ void _splitpath(LPCSTR name, LPSTR drive, LPSTR dir, LPSTR fn, LPSTR ft)
/***********************************************************************/
/* Define the makepath function not existing in the UNIX library. */
/***********************************************************************/
void _makepath(LPSTR name, LPCSTR drive, LPCSTR dir, LPCSTR fn, LPCSTR ft)
void _makepath(LPSTR name, LPCSTR drive __attribute__((unused)), LPCSTR dir, LPCSTR fn, LPCSTR ft)
{
int n;
......@@ -196,7 +196,7 @@ char *_fullpath(char *absPath, const char *relPath, size_t maxLength)
return absPath;
} /* end of _fullpath */
BOOL MessageBeep(uint i)
BOOL MessageBeep(uint i __attribute__((unused)))
{
// Fixme
return TRUE;
......
......@@ -447,7 +447,7 @@ void *PlugAllocMem(PGLOBAL g, uint size)
/* Here there should be some verification done such as validity of */
/* the address and size not larger than memory size. */
/***********************************************************************/
BOOL PlugSubSet(PGLOBAL g, void *memp, uint size)
BOOL PlugSubSet(PGLOBAL g __attribute__((unused)), void *memp, uint size)
{
PPOOLHEADER pph = memp;
......
......@@ -117,6 +117,7 @@ class TBTBLK : public TIDBLK {
#if !defined(__BORLANDC__)
// Avoid warning C4291 by defining a matching dummy delete operator
void operator delete(void *, TIDBLK*) {}
void operator delete(void *, size_t size) {}
#endif
protected:
......
......@@ -70,7 +70,7 @@ class DllExport TDBPRX : public TDBASE {
virtual int GetRecpos(void) {return Tdbp->GetRecpos();}
virtual void ResetDB(void) {Tdbp->ResetDB();}
virtual int RowNumber(PGLOBAL g, bool b = FALSE);
virtual PSZ GetServer(void) {return (Tdbp) ? Tdbp->GetServer() : "?";}
virtual PSZ GetServer(void) {return (Tdbp) ? Tdbp->GetServer() : (char*) "?";}
// Database routines
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
......
......@@ -49,7 +49,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_accounts::m_field_def=
{ 4, field_types };
{ 4, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_accounts::m_share=
......
......@@ -75,7 +75,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esgs_by_account_by_event_name::m_field_def=
{ 8, field_types };
{ 8, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esgs_by_account_by_event_name::m_share=
......
......@@ -71,7 +71,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esgs_by_host_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esgs_by_host_by_event_name::m_share=
......
......@@ -70,7 +70,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esgs_by_thread_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esgs_by_thread_by_event_name::m_share=
......
......@@ -71,7 +71,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esgs_by_user_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esgs_by_user_by_event_name::m_share=
......
......@@ -67,7 +67,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esgs_global_by_event_name::m_field_def=
{ 6, field_types };
{ 6, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esgs_global_by_event_name::m_share=
......
......@@ -170,7 +170,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_by_account_by_event_name::m_field_def=
{ 27, field_types };
{ 27, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_by_account_by_event_name::m_share=
......
......@@ -184,7 +184,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_by_digest::m_field_def=
{ 29, field_types };
{ 29, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_by_digest::m_share=
......
......@@ -166,7 +166,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_by_host_by_event_name::m_field_def=
{ 26, field_types };
{ 26, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_by_host_by_event_name::m_share=
......
......@@ -165,7 +165,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_by_thread_by_event_name::m_field_def=
{ 26, field_types };
{ 26, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_by_thread_by_event_name::m_share=
......
......@@ -166,7 +166,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_by_user_by_event_name::m_field_def=
{ 26, field_types };
{ 26, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_by_user_by_event_name::m_share=
......
......@@ -162,7 +162,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_esms_global_by_event_name::m_field_def=
{ 25, field_types };
{ 25, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_esms_global_by_event_name::m_share=
......
......@@ -84,7 +84,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_events_stages_current::m_field_def=
{10 , field_types };
{10 , field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_events_stages_current::m_share=
......
......@@ -237,7 +237,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_events_statements_current::m_field_def=
{40 , field_types };
{40 , field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_events_statements_current::m_share=
......
......@@ -69,7 +69,7 @@ static const TABLE_FIELD_TYPE ews_by_instance_field_types[]=
TABLE_FIELD_DEF
table_events_waits_summary_by_instance::m_field_def=
{ 7, ews_by_instance_field_types };
{ 7, ews_by_instance_field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_events_waits_summary_by_instance::m_share=
......
......@@ -75,7 +75,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_ews_by_account_by_event_name::m_field_def=
{ 8, field_types };
{ 8, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_ews_by_account_by_event_name::m_share=
......
......@@ -71,7 +71,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_ews_by_host_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_ews_by_host_by_event_name::m_share=
......
......@@ -70,7 +70,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_ews_by_thread_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_ews_by_thread_by_event_name::m_share=
......
......@@ -71,7 +71,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_ews_by_user_by_event_name::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_ews_by_user_by_event_name::m_share=
......
......@@ -156,7 +156,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_file_summary_by_event_name::m_field_def=
{ 23, field_types };
{ 23, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_file_summary_by_event_name::m_share=
......
......@@ -165,7 +165,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_file_summary_by_instance::m_field_def=
{ 25, field_types };
{ 25, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_file_summary_by_instance::m_share=
......
......@@ -176,7 +176,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_host_cache::m_field_def=
{ 29, field_types };
{ 29, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_host_cache::m_share=
......
......@@ -45,7 +45,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_hosts::m_field_def=
{ 3, field_types };
{ 3, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_hosts::m_share=
......
......@@ -74,7 +74,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_os_global_by_type::m_field_def=
{ 8, field_types };
{ 8, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_os_global_by_type::m_share=
......
......@@ -40,7 +40,7 @@ static const TABLE_FIELD_TYPE field_types[]=
};
TABLE_FIELD_DEF table_session_connect::m_field_def=
{ 4, field_types };
{ 4, field_types, 0, (uint*) 0 };
table_session_connect::table_session_connect(const PFS_engine_table_share *share) :
cursor_by_thread_connect_attr(share)
......
......@@ -50,7 +50,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_setup_actors::m_field_def=
{ 3, field_types };
{ 3, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_setup_actors::m_share=
......
......@@ -61,7 +61,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_setup_objects::m_field_def=
{ 5, field_types };
{ 5, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_setup_objects::m_share=
......
......@@ -69,7 +69,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_socket_instances::m_field_def=
{ 7, field_types };
{ 7, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_socket_instances::m_share=
......
......@@ -156,7 +156,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_socket_summary_by_event_name::m_field_def=
{ 23, field_types };
{ 23, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_socket_summary_by_event_name::m_share=
......
......@@ -160,7 +160,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_socket_summary_by_instance::m_field_def=
{ 24, field_types };
{ 24, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_socket_summary_by_instance::m_share=
......
......@@ -230,7 +230,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_tiws_by_index_usage::m_field_def=
{ 39, field_types };
{ 39, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_tiws_by_index_usage::m_share=
......
......@@ -225,7 +225,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_tiws_by_table::m_field_def=
{ 38, field_types };
{ 38, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_tiws_by_table::m_share=
......
......@@ -400,7 +400,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_tlws_by_table::m_field_def=
{ 73, field_types };
{ 73, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_tlws_by_table::m_share=
......
......@@ -45,7 +45,7 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_users::m_field_def=
{ 3, field_types };
{ 3, field_types, 0, (uint*) 0 };
PFS_engine_table_share
table_users::m_share=
......
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