diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-17 10:33:06 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-17 10:33:06 +0200 |
commit | 06e3bc4390ee286fd20b34526510768f1b32ed7f (patch) | |
tree | 1f0bcd5590135b1536e3cc5526792b84e2c2ecf0 | |
parent | b73d85277939e3edff90e1ff927218a541a2c136 (diff) | |
download | mariadb-git-06e3bc4390ee286fd20b34526510768f1b32ed7f.tar.gz |
MDEV-17841 fixup: GCC -Wmaybe-uninitialized
In commit ab38b7511bad8cc03a67f0d43e7169e6dfcac9fa
an added "goto err" would seemingly cause a read of
an uninitialized variable old_info if errpos>=5.
However, because we would have errpos=0 at that point,
there was no real error.
-rw-r--r-- | storage/maria/ma_open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c index db15778bc23..cf5bf2a5fea 100644 --- a/storage/maria/ma_open.c +++ b/storage/maria/ma_open.c @@ -1,5 +1,5 @@ /* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - Copyright (c) 2009, 2021, MariaDB Corporation Ab + Copyright (c) 2009, 2022, MariaDB Corporation Ab 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 @@ -276,7 +276,7 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN], data_name[FN_REFLEN]; uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; - MARIA_HA info, *UNINIT_VAR(m_info), *old_info; + MARIA_HA info, *UNINIT_VAR(m_info), *old_info= NULL; MARIA_SHARE share_buff,*share; double *rec_per_key_part; ulong *nulls_per_key_part; @@ -327,7 +327,6 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, } #endif /* WITH_S3_STORAGE_ENGINE */ - old_info= 0; if (!internal_table) mysql_mutex_lock(&THR_LOCK_maria); if ((open_flags & HA_OPEN_COPY) || |