diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-23 09:00:37 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-23 09:00:37 +0300 |
commit | 8a33d36dac5330336eca0543d814fa5d97a46361 (patch) | |
tree | 0782fd0acc113cf462ae25c2c282e477895e819c /sql/sql_view.cc | |
parent | e4901d9523ab838ea13bb0278980f8707aa2c581 (diff) | |
download | mariadb-git-8a33d36dac5330336eca0543d814fa5d97a46361.tar.gz |
Fix GCC 11.2.0 -Wmaybe-uninitialized
TABLE_LIST::calc_md5(): Remove an untruthful const qualifier.
thd_get_query_start_data(): Pass empty_clex_str instead of
an uninitialized LEX_CSTRING.
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 8b398bf3996..258e6e2ca4e 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2004, 2013, Oracle and/or its affiliates. - Copyright (c) 2011, 2016, MariaDB Corporation + Copyright (c) 2011, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -836,7 +836,7 @@ int mariadb_fix_view(THD *thd, TABLE_LIST *view, bool wrong_checksum, if ((view->md5.str= (char *)thd->alloc(32 + 1)) == NULL) DBUG_RETURN(HA_ADMIN_FAILED); } - view->calc_md5(view->md5.str); + view->calc_md5(const_cast<char*>(view->md5.str)); view->md5.length= 32; } view->mariadb_version= MYSQL_VERSION_ID; |