1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed compiler warnings in a lot of files

Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value
Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined


client/get_password.c:
  Fixed compiler warning
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning by adding marco to be used when largest_char is 255
cmd-line-utils/readline/display.c:
  Fixed compiler warnings by removing not accessed variables
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warnings by removing not accessed variables
cmd-line-utils/readline/history.c:
  Fixed compiler warnings by adding cast
cmd-line-utils/readline/text.c:
  Fixed compiler warnings by removing not accessed variables and adding casts
dbug/dbug.c:
  Fixed compiler warnings by changing types
include/mysql_com.h:
  Added IMPOSSIBLE_RESULT to avoid compiler warnings when using (Item_result) -1 as a dummy value
libmysql/libmysql.c:
  Fixed compiler warning
mysql-test/t/query_cache_debug.test:
  Mark test as BIG as it uses a lot of memory
mysys/mf_iocache2.c:
  Fixed compiler warnings by adding cast
sql/event_data_objects.cc:
  Fixed compiler warnings by removing not used code
sql/events.cc:
  Fixed compiler warnings by removing not used code
sql/field.cc:
  Fixed compiler warnings by adding cast and removed not accessed variables
sql/ha_partition.cc:
  Fixed compiler warnings by removing not used code
sql/item.cc:
  Fixed compiler warnings by removing not accessed variables
  Use IMPOSSIBLE_RESULT instead of (Item_result)-1
sql/item_cmpfunc.cc:
  Fixed compiler warnings by removing not accessed variables
sql/item_func.cc:
  Fixed compiler warnings by removing not used code and not accessed variables
  Added IMPOSSIBLE_RESULT
sql/item_subselect.cc:
  Fixed compiler warnings by removing not accessed variables
sql/item_xmlfunc.cc:
  Fixed forgotten setting of xpath->error
sql/log.cc:
  Fixed compiler warnings by removing not accessed variables
sql/log_event.cc:
  Added IMPOSSIBLE_RESULT into switch
  Fixed wrong usage of DBUG_ASSERT(1)
  Removed always true DBUG_ASSERT()
sql/mysqld.cc:
  Fixed compiler warnings by adding casts for ULONG_MAX
sql/opt_sum.cc:
  Fixed compiler warnings by removing not used code
  Removed wrong DBUG_ASSERT()
sql/partition_info.cc:
  Fixed compiler warnings by removing not accessed variables
sql/rpl_injector.h:
  Removed always true part from DBUG_ASSERT() to remove compiler warning
sql/spatial.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_acl.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_base.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_cache.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_class.cc:
  Fixed compiler warnings by:
  - Removing always true part from DBUG_ASSERT()
  - Removing not used code
  - Added IMPOSSIBLE_RESULT into switch
sql/sql_load.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_parse.cc:
  Fixed compiler warnings by:
  - Removing not accessed variables
  - Removing always true part from DBUG_ASSERT()
  - Removing not used code
sql/sql_plugin.cc:
  Added comment
sql/sql_prepare.cc:
  Fixed compiler warnings by removing not accessed variables
sql/sql_show.cc:
  Fixed compiler warnings by using correct cast
sql/sql_table.cc:
  Fixed compiler warnings by removing not used code and removing not accessed variables
sql/table.cc:
  Fixed compiler warnings by removing not accessed variables
sql/time.cc:
  Fixed wrong DBUG_ASSERT(1)
storage/maria/unittest/Makefile.am:
  Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
storage/maria/unittest/ma_pagecache_consist.c:
  Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
storage/maria/unittest/ma_pagecache_single.c:
  Changed PAGE_SIZE to TEST_PAGE_SIZE to avoid compiler errors on systems where PAGE_SIZE is defined
tests/mysql_client_test.c:
  Fixed compiler warnings by removing not accessed variables and changing types
This commit is contained in:
unknown
2008-02-13 21:27:12 +02:00
parent 3056d07a86
commit 8170b22b5c
44 changed files with 244 additions and 250 deletions

View File

@ -40,7 +40,9 @@
#define MAX_SERVER_ARGS 64
/* set default options */
#ifdef NOT_USED
static int opt_testcase = 0;
#endif
static char *opt_db= 0;
static char *opt_user= 0;
static char *opt_password= 0;
@ -12643,7 +12645,7 @@ static void test_conversion()
const char *stmt_text;
int rc;
MYSQL_BIND my_bind[1];
char buff[4];
uchar buff[4];
ulong length;
myheader("test_conversion");
@ -12666,7 +12668,7 @@ static void test_conversion()
check_execute(stmt, rc);
bzero((char*) my_bind, sizeof(my_bind));
my_bind[0].buffer= buff;
my_bind[0].buffer= (char*) buff;
my_bind[0].length= &length;
my_bind[0].buffer_type= MYSQL_TYPE_STRING;
@ -12691,7 +12693,7 @@ static void test_conversion()
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc == 0);
DIE_UNLESS(length == 1);
DIE_UNLESS((uchar) buff[0] == 0xE0);
DIE_UNLESS(buff[0] == 0xE0);
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc == MYSQL_NO_DATA);
@ -15865,11 +15867,10 @@ static void test_bug21206()
static void test_status()
{
const char *status;
DBUG_ENTER("test_status");
myheader("test_status");
if (!(status= mysql_stat(mysql)))
if (!mysql_stat(mysql))
{
myerror("mysql_stat failed"); /* purecov: inspected */
die(__FILE__, __LINE__, "mysql_stat failed"); /* purecov: inspected */
@ -17548,7 +17549,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
DBUG_PUSH(argument ? argument : default_dbug_option);
break;
case 'c':
#ifdef NOT_USED
opt_testcase = 1;
#endif
break;
case 'p':
if (argument)