From c04d5985c1cee79921de5a8ca4b684e82d2c5695 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Mar 2007 10:52:25 +0200 Subject: [PATCH] Disabled compiler warnings. sql/ha_archive.cc: Fixed a warning from unused computed value. This block is only used in debug mode and changes nothing. support-files/compiler_warnings.supp: Disabled a warning from BDB. --- sql/ha_archive.cc | 4 +++- support-files/compiler_warnings.supp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/ha_archive.cc b/sql/ha_archive.cc index 730d8b46945..2ee514f29c9 100644 --- a/sql/ha_archive.cc +++ b/sql/ha_archive.cc @@ -749,10 +749,12 @@ int ha_archive::write_row(byte *buf) DBUG_PRINT("archive",("MyPack is %d\n", (*field)->data_length((char*) buf + (*field)->offset()))); if ((*field)->real_type() == MYSQL_TYPE_VARCHAR) { +#ifndef DBUG_OFF uint actual_length= (*field)->data_length((char*) buf + (*field)->offset()); - IF_DBUG(uint offset=) (*field)->offset() + actual_length + + uint offset= (*field)->offset() + actual_length + (actual_length > 255 ? 2 : 1); DBUG_PRINT("archive",("Offset is %d -> %d\n", actual_length, offset)); +#endif /* if ((*field)->pack_length() + (*field)->offset() != offset) bzero(buf + offset, (size_t)((*field)->pack_length() + (actual_length > 255 ? 2 : 1) - (*field)->data_length)); diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp index 2cf43f230c3..46f706198c0 100644 --- a/support-files/compiler_warnings.supp +++ b/support-files/compiler_warnings.supp @@ -30,6 +30,7 @@ pars0lex.l: .*conversion from 'ulint' to 'int', possible loss of data.* .*/bdb/.* : .*empty body in an if-statement.* .*/bdb/.* : .*conversion from 'u?lint' to 'int', possible loss of data.* db_vrfy.c : .*comparison is always false due to limited range of data type.* +dbm.c : .*'item.dsize' is used uninitialized in this function.* # # Ignore all conversion warnings on windows 64