From 7d8f33eaf7c58cab4be033ab7da2c66f50ad9b9b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Nov 2004 11:24:18 +0200 Subject: [PATCH] Fixed one warning and two errors reported by VC 6.0. BitKeeper/etc/ignore: Added ndb/tools/ndb_restore to the ignore list sql/item.cc: Fixed VC 6.0 warning: mysql-5.0.2-alpha\sql\item.cpp(1729) : warning C4715: 'resolve_ref_in_select_and_group' : not all control paths return a value sql/opt_range.cc: Fixed VC 6.0 errors: ERROR # 4: mysql-5.0.2-alpha\sql\opt_range.cpp(8070) : error C2664: 'key_cmp' : cannot convert parameter 2 from 'char *' to 'const unsigned char *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ERROR # 5: mysql-5.0.2-alpha\sql\opt_range.cpp(8196) : error C2664: 'key_cmp' : cannot convert parameter 2 from 'char *' to 'const unsigned char *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast --- .bzrignore | 1 + sql/item.cc | 3 +++ sql/opt_range.cc | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.bzrignore b/.bzrignore index 90cf63c1379..d704da6261d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -960,3 +960,4 @@ vio/test-sslclient vio/test-sslserver vio/viotest-ssl ac_available_languages_fragment +ndb/tools/ndb_restore diff --git a/sql/item.cc b/sql/item.cc index ea721eea831..42535b9c904 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1722,7 +1722,10 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select) else if (group_by_ref) return group_by_ref; else + { DBUG_ASSERT(FALSE); + return NULL; /* So there is no compiler warning. */ + } } else return (Item**) not_found_item; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 738fcbb91e2..3368482f28d 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -8066,7 +8066,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range() boundary of cur_range, there is no need to check this range. */ if (range_idx != 0 && !(cur_range->flag & NO_MAX_RANGE) && - (key_cmp(min_max_arg_part, (byte*) cur_range->max_key, + (key_cmp(min_max_arg_part, (const byte*) cur_range->max_key, min_max_arg_len) == 1)) continue; @@ -8193,7 +8193,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range() */ if (range_idx != min_max_ranges.elements && !(cur_range->flag & NO_MIN_RANGE) && - (key_cmp(min_max_arg_part, (byte*) cur_range->min_key, + (key_cmp(min_max_arg_part, (const byte*) cur_range->min_key, min_max_arg_len) == -1)) continue;