summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-08-23 09:00:37 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-08-23 09:00:37 +0300
commit8a33d36dac5330336eca0543d814fa5d97a46361 (patch)
tree0782fd0acc113cf462ae25c2c282e477895e819c /sql/table.cc
parente4901d9523ab838ea13bb0278980f8707aa2c581 (diff)
downloadmariadb-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/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index be734b734bc..18bb28e0863 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
- Copyright (c) 2008, 2020, MariaDB
+ Copyright (c) 2008, 2021, MariaDB
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
@@ -4879,12 +4879,12 @@ void TABLE::reset_item_list(List<Item> *item_list, uint skip) const
buffer buffer for md5 writing
*/
-void TABLE_LIST::calc_md5(const char *buffer)
+void TABLE_LIST::calc_md5(char *buffer)
{
uchar digest[16];
compute_md5_hash(digest, select_stmt.str,
select_stmt.length);
- sprintf((char *) buffer,
+ sprintf(buffer,
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
digest[0], digest[1], digest[2], digest[3],
digest[4], digest[5], digest[6], digest[7],