Commit 59f80387 authored by unknown's avatar unknown

Fix some compiler warnings cause by GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478


storage/maria/ma_blockrec.c:
  GCC warns about const vs. non-const despite cast
  (but it is in any case cleaner to avoid the cast completely)
support-files/compiler_warnings.supp:
  Silence a wrong compiler warning caused by GCC bug.
parent 22a9f9b2
...@@ -5448,7 +5448,7 @@ static size_t fill_insert_undo_parts(MARIA_HA *info, const uchar *record, ...@@ -5448,7 +5448,7 @@ static size_t fill_insert_undo_parts(MARIA_HA *info, const uchar *record,
Store total blob length to make buffer allocation easier during UNDO Store total blob length to make buffer allocation easier during UNDO
*/ */
log_parts->str= info->length_buff; log_parts->str= info->length_buff;
log_parts->length= (uint) (ma_store_length((uchar *) log_parts->str, log_parts->length= (uint) (ma_store_length(info->length_buff,
info->cur_row.blob_length) - info->cur_row.blob_length) -
(uchar*) log_parts->str); (uchar*) log_parts->str);
row_length+= log_parts->length; row_length+= log_parts->length;
...@@ -5592,7 +5592,7 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec, ...@@ -5592,7 +5592,7 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec,
MARIA_SHARE *share= info->s; MARIA_SHARE *share= info->s;
MARIA_COLUMNDEF *column, *end_column; MARIA_COLUMNDEF *column, *end_column;
MARIA_ROW *old_row= &info->cur_row, *new_row= &info->new_row; MARIA_ROW *old_row= &info->cur_row, *new_row= &info->new_row;
uchar *field_data, *start_field_data; uchar *field_data, *start_field_data, *length_str;
uchar *old_field_lengths= old_row->field_lengths; uchar *old_field_lengths= old_row->field_lengths;
uchar *new_field_lengths= new_row->field_lengths; uchar *new_field_lengths= new_row->field_lengths;
size_t row_length= 0; size_t row_length= 0;
...@@ -5749,9 +5749,9 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec, ...@@ -5749,9 +5749,9 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec,
/* Store length of field length data before the field/field_lengths */ /* Store length of field length data before the field/field_lengths */
field_lengths= (uint) (field_data - start_field_data); field_lengths= (uint) (field_data - start_field_data);
start_log_parts->str= ((start_field_data - length_str= start_field_data - ma_calc_length_for_store_length(field_lengths);
ma_calc_length_for_store_length(field_lengths))); start_log_parts->str= length_str;
ma_store_length((uchar*)start_log_parts->str, field_lengths); ma_store_length(length_str, field_lengths);
start_log_parts->length= (size_t) (field_data - start_log_parts->str); start_log_parts->length= (size_t) (field_data - start_log_parts->str);
row_length+= start_log_parts->length; row_length+= start_log_parts->length;
DBUG_RETURN(row_length); DBUG_RETURN(row_length);
......
...@@ -109,3 +109,6 @@ ma_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550- ...@@ -109,3 +109,6 @@ ma_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 550-
# #
.* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.* .* : .*no matching operator delete found; memory will not be freed if initialization throws an exception.*
ctype-simple.c : .*unary minus operator applied to unsigned type, result still unsigned.* ctype-simple.c : .*unary minus operator applied to unsigned type, result still unsigned.*
# Wrong warning due to GCC bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478
regexec\.c : .*passing argument 3 of.*matcher.* discards qualifiers from pointer target type.*
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment