Skip to content

Commit b54e243

Browse files
author
Tor Didriksen
committed
Bug#20459338 FIX SOME COMPILE ERRORS IN SERVER CODE
This patch is based on from https://github.com/webscalesql/webscalesql-5.6 patch a49907fc6 Fix errors detected by ASan at compile time
1 parent 10efe76 commit b54e243

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

sql/mysqld.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ static void network_init(void)
23892389
returned by getaddrinfo();
23902390
*/
23912391

2392-
struct addrinfo *a;
2392+
struct addrinfo *a = NULL;
23932393
ip_sock= create_socket(ai, AF_INET, &a);
23942394

23952395
if (mysql_socket_getfd(ip_sock) == INVALID_SOCKET)

strings/ctype-utf8.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8289,7 +8289,8 @@ my_strnncoll_utf8mb4(const CHARSET_INFO *cs,
82898289
const uchar *t, size_t tlen,
82908290
my_bool t_is_prefix)
82918291
{
8292-
my_wc_t s_wc,t_wc;
8292+
my_wc_t s_wc= 0;
8293+
my_wc_t t_wc= 0;
82938294
const uchar *se= s + slen;
82948295
const uchar *te= t + tlen;
82958296
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
@@ -8357,7 +8358,8 @@ my_strnncollsp_utf8mb4(const CHARSET_INFO *cs,
83578358
my_bool diff_if_only_endspace_difference)
83588359
{
83598360
int res;
8360-
my_wc_t s_wc, t_wc;
8361+
my_wc_t s_wc= 0;
8362+
my_wc_t t_wc= 0;
83618363
const uchar *se= s + slen, *te= t + tlen;
83628364
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
83638365
LINT_INIT(s_wc);

0 commit comments

Comments
 (0)