Details
Description
GCC 13 emits a new warning for some old code from 2006:
10.4 9c0e91a27cc58d1b5076435e125c70cd277fd989 |
/mariadb/10.4/sql/sql_parse.cc: In function 'bool execute_show_status(THD*, TABLE_LIST*)':
|
/mariadb/10.4/sql/sql_parse.cc:6506:26: error: storing the address of local variable 'old_status_var' in '*thd.THD::initial_status_var' [-Werror=dangling-pointer=]
|
6506 | thd->initial_status_var= &old_status_var;
|
Possibly this could be fixed by allocating old_status_var from the heap. I don’t think that alloca() would help here.