From 31e1b12eb0fb67d3d65973fb1cd574be64373e04 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 8 Oct 2010 11:52:39 -0300 Subject: [PATCH] Bug#45288: pb2 returns a lot of compilation warnings on linux Fix assorted compiler warnings. --- sql/mysqld.cc | 7 +++---- storage/innobase/include/ibuf0ibuf.h | 2 +- storage/innobase/include/row0row.h | 2 +- strings/my_vsnprintf.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e489d466d5f..99754e8b7f6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3244,12 +3244,11 @@ static int init_common_variables() desired page sizes. */ int nelem; - int max_desired_page_size; - int max_page_size; + size_t max_desired_page_size; if (opt_super_large_pages) - max_page_size= SUPER_LARGE_PAGESIZE; + max_desired_page_size= SUPER_LARGE_PAGESIZE; else - max_page_size= LARGE_PAGESIZE; + max_desired_page_size= LARGE_PAGESIZE; nelem = getpagesizes(NULL, 0); if (nelem > 0) { diff --git a/storage/innobase/include/ibuf0ibuf.h b/storage/innobase/include/ibuf0ibuf.h index 0f1631fde77..4bb59be6a3e 100644 --- a/storage/innobase/include/ibuf0ibuf.h +++ b/storage/innobase/include/ibuf0ibuf.h @@ -43,7 +43,7 @@ typedef enum { IBUF_OP_DELETE = 2, /* Number of different operation types. */ - IBUF_OP_COUNT = 3, + IBUF_OP_COUNT = 3 } ibuf_op_t; /** Combinations of operations that can be buffered. Because the enum diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h index 195691a420b..110525ecfed 100644 --- a/storage/innobase/include/row0row.h +++ b/storage/innobase/include/row0row.h @@ -267,7 +267,7 @@ enum row_search_result { secondary index leaf page was not in the buffer pool, and the operation was enqueued in the insert/delete buffer */ - ROW_NOT_DELETED_REF, /*!< BTR_DELETE was specified, and + ROW_NOT_DELETED_REF /*!< BTR_DELETE was specified, and row_purge_poss_sec() failed */ }; diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index 1284203f739..e9786dacfdc 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -513,7 +513,7 @@ start: arg_count= max(arg_count, arg_index); goto start; } - DBUG_ASSERT(0); + return 0; }