Skip to content

Commit c2a9291

Browse files
committed
MDEV-17491 post-fix: GCC 7 -Wclass-memaccess
commit 3a37644 added a non-POD member buf_page_info_t::id, and thus GCC 7 or later would complain about a memset() call. Let my_malloc fill the memory for us.
1 parent d72594d commit c2a9291

File tree

1 file changed

+1
-3
lines changed
  • storage/innobase/handler

1 file changed

+1
-3
lines changed

storage/innobase/handler/i_s.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,15 +4612,13 @@ static int i_s_innodb_fill_buffer_lru(THD *thd, TABLE_LIST *tables, Item *)
46124612

46134613
/* Print error message if malloc fail */
46144614
info_buffer = (buf_page_info_t*) my_malloc(PSI_INSTRUMENT_ME,
4615-
lru_len * sizeof *info_buffer, MYF(MY_WME));
4615+
lru_len * sizeof *info_buffer, MYF(MY_WME | MY_ZEROFILL));;
46164616

46174617
if (!info_buffer) {
46184618
status = 1;
46194619
goto exit;
46204620
}
46214621

4622-
memset(info_buffer, 0, lru_len * sizeof *info_buffer);
4623-
46244622
/* Walk through Pool's LRU list and print the buffer page
46254623
information */
46264624
bpage = UT_LIST_GET_LAST(buf_pool.LRU);

0 commit comments

Comments
 (0)