1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#45288: pb2 returns a lot of compilation warnings on linux

Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
This commit is contained in:
Davi Arnaut
2010-07-20 15:07:36 -03:00
parent d676c3ff0e
commit c96b249fc3
34 changed files with 155 additions and 174 deletions

View File

@@ -1701,16 +1701,19 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count,
#endif
int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
int my_b_flush_io_cache(IO_CACHE *info,
int need_append_buffer_lock __attribute__((unused)))
{
size_t length;
my_bool append_cache;
my_off_t pos_in_file;
my_bool append_cache= (info->type == SEQ_READ_APPEND);
DBUG_ENTER("my_b_flush_io_cache");
DBUG_PRINT("enter", ("cache: 0x%lx", (long) info));
if (!(append_cache = (info->type == SEQ_READ_APPEND)))
need_append_buffer_lock=0;
#ifdef THREAD
if (!append_cache)
need_append_buffer_lock= 0;
#endif
if (info->type == WRITE_CACHE || append_cache)
{