1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#59585 Fix 58912 introduces compiler warning

due to potentially uninitialized variable

row_upd_changes_ord_field_binary(): Initialize dfield_len to suppress the
warning. The compiler cannot know that row_ext_lookup() does initialize
dfield_len for us, as it is defined in a different module.
This commit is contained in:
Marko Mäkelä
2011-01-25 15:43:08 +02:00
parent 896e0ba4e0
commit e44703db76
2 changed files with 10 additions and 0 deletions

View File

@ -1252,6 +1252,10 @@ row_upd_changes_ord_field_binary(
|| dfield_is_null(dfield)) {
/* do nothing special */
} else if (UNIV_LIKELY_NULL(ext)) {
/* Silence a compiler warning without
silencing a Valgrind error. */
dfield_len = 0;
UNIV_MEM_INVALID(&dfield_len, sizeof dfield_len);
/* See if the column is stored externally. */
buf = row_ext_lookup(ext, col_no, &dfield_len);