From a073ee45c290d81d365b48b03ef6924e778cd64f Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Tue, 9 Jun 2009 18:11:21 +0200 Subject: Bug #43414 Parenthesis (and other) warnings compiling MySQL with gcc 4.3.2 Compiling MySQL with gcc 4.3.2 and later produces a number of warnings, many of which are new with the recent compiler versions. This bug will be resolved in more than one patch to limit the size of changesets. This is the first patch, fixing a number of the warnings, predominantly "suggest using parentheses around && in ||", and empty for and while bodies. --- sql/log_event.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/log_event.cc') diff --git a/sql/log_event.cc b/sql/log_event.cc index a440f010fa5..3a6daadd11a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1733,7 +1733,8 @@ void Query_log_event::print_query_header(FILE* file, if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db) { - if (different_db= memcmp(print_event_info->db, db, db_len + 1)) + different_db= memcmp(print_event_info->db, db, db_len + 1); + if (different_db) memcpy(print_event_info->db, db, db_len + 1); if (db[0] && different_db) fprintf(file, "use %s%s\n", db, print_event_info->delimiter); -- cgit v1.2.1