Commit 06e3bc43 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-17841 fixup: GCC -Wmaybe-uninitialized

In commit ab38b751
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.
parent b73d8527
/* Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB /* 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 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 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, ...@@ -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], char name_buff[FN_REFLEN], org_name[FN_REFLEN], index_name[FN_REFLEN],
data_name[FN_REFLEN]; data_name[FN_REFLEN];
uchar *UNINIT_VAR(disk_cache), *disk_pos, *end_pos; 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; MARIA_SHARE share_buff,*share;
double *rec_per_key_part; double *rec_per_key_part;
ulong *nulls_per_key_part; ulong *nulls_per_key_part;
...@@ -327,7 +327,6 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags, ...@@ -327,7 +327,6 @@ MARIA_HA *maria_open(const char *name, int mode, uint open_flags,
} }
#endif /* WITH_S3_STORAGE_ENGINE */ #endif /* WITH_S3_STORAGE_ENGINE */
old_info= 0;
if (!internal_table) if (!internal_table)
mysql_mutex_lock(&THR_LOCK_maria); mysql_mutex_lock(&THR_LOCK_maria);
if ((open_flags & HA_OPEN_COPY) || if ((open_flags & HA_OPEN_COPY) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment