diff options
author | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@sun.com> | 2010-05-26 16:12:23 +0200 |
commit | d8536dfbddbf98df10081bdbf83b2c06cf9d01c1 (patch) | |
tree | e02f9ec4f4f64535006e2aeecf1ec1497146b50c /sql/partition_info.cc | |
parent | 33e9d05c086a54ec0cd3860acdc01585e0d4fda6 (diff) | |
download | mariadb-git-d8536dfbddbf98df10081bdbf83b2c06cf9d01c1.tar.gz |
Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 4a2d457df9c..e505630d08f 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -701,12 +701,11 @@ bool partition_info::check_range_constants(THD *thd) if (column_list) { part_column_list_val *loc_range_col_array; - part_column_list_val *current_largest_col_val; + part_column_list_val *UNINIT_VAR(current_largest_col_val); uint num_column_values= part_field_list.elements; uint size_entries= sizeof(part_column_list_val) * num_column_values; range_col_array= (part_column_list_val*)sql_calloc(num_parts * size_entries); - LINT_INIT(current_largest_col_val); if (unlikely(range_col_array == NULL)) { mem_alloc_error(num_parts * size_entries); @@ -739,12 +738,10 @@ bool partition_info::check_range_constants(THD *thd) } else { - longlong current_largest; + longlong UNINIT_VAR(current_largest); longlong part_range_value; bool signed_flag= !part_expr->unsigned_flag; - LINT_INIT(current_largest); - part_result_type= INT_RESULT; range_int_array= (longlong*)sql_alloc(num_parts * sizeof(longlong)); if (unlikely(range_int_array == NULL)) @@ -894,7 +891,8 @@ bool partition_info::check_list_constants(THD *thd) part_elem_value *list_value; bool result= TRUE; longlong type_add, calc_value; - void *curr_value, *prev_value; + void *curr_value; + void *UNINIT_VAR(prev_value); partition_element* part_def; bool found_null= FALSE; int (*compare_func)(const void *, const void*); @@ -1009,7 +1007,6 @@ bool partition_info::check_list_constants(THD *thd) compare_func); i= 0; - LINT_INIT(prev_value); do { DBUG_ASSERT(i < num_list_values); |