From 6eb81bbb224b83896227a9491e5914f3f414292c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Nov 2004 14:17:09 +0200 Subject: [PATCH] fixing compiler warnings sql/item_func.cc: fixed type sql/sql_base.cc: keep kompiller happy about unused lable in libmysqld sql/sql_view.cc: keep kompiller happy about unused variable in libmysqld sql/table.h: correct type casting --- sql/item_func.cc | 2 +- sql/sql_base.cc | 3 ++- sql/sql_view.cc | 7 +++++-- sql/table.h | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index 8d4ad54b511..4455be53c5d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -174,7 +174,7 @@ bool Item_func::agg_arg_charsets(DTCollation &coll, for (arg= args, last= args + nargs; arg < last; arg++) { Item* conv; - uint dummy_offset; + uint32 dummy_offset; if (!String::needs_conversion(0, coll.collation, (*arg)->collation.collation, &dummy_offset)) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f2209fe3d90..0373585af2a 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3037,8 +3037,9 @@ insert_fields(THD *thd, TABLE_LIST *tables, const char *db_name, my_message(ER_NO_TABLES_USED, ER(ER_NO_TABLES_USED), MYF(0)); else my_error(ER_BAD_TABLE_ERROR, MYF(0), table_name); - +#ifndef NO_EMBEDDED_ACCESS_CHECKS err: +#endif DBUG_RETURN(1); } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 68024876b32..aa7fda4e3d0 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -55,7 +55,10 @@ bool mysql_create_view(THD *thd, TABLE_LIST *view= lex->unlink_first_table(&link_to_local); TABLE_LIST *tables= lex->query_tables; TABLE_LIST *tbl; - SELECT_LEX *select_lex= &lex->select_lex, *sl; + SELECT_LEX *select_lex= &lex->select_lex; +#ifndef NO_EMBEDDED_ACCESS_CHECKS + SELECT_LEX *sl; +#endif SELECT_LEX_UNIT *unit= &lex->unit; bool res= FALSE; DBUG_ENTER("mysql_create_view"); @@ -745,7 +748,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table) table->effective_algorithm= VIEW_ALGORITHM_MERGE; DBUG_PRINT("info", ("algorithm: MERGE")); table->updatable= (table->updatable_view != 0); - table->effective_with_check= table->with_check; + table->effective_with_check= (uint8)table->with_check; table->ancestor= view_tables; /* diff --git a/sql/table.h b/sql/table.h index db3ce638842..26c232ea39b 100644 --- a/sql/table.h +++ b/sql/table.h @@ -274,7 +274,7 @@ typedef struct st_schema_table #define VIEW_CHECK_SKIP 2 struct st_lex; -struct select_union; +class select_union; typedef struct st_table_list {