From b811c6ecc74cc1421eedc92573447768d1eb7980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 13 Aug 2020 18:21:30 +0300 Subject: Fix GCC 10.2.0 -Og -Wmaybe-uninitialized Fix some more cases after merging commit 31aef3ae99dff6b7154cf288b3dc508d367f19f8. Some warnings look possibly genuine, others are clearly bogus. --- sql/sql_repl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sql/sql_repl.cc') diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index cd8a2129410..4b23348b306 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -374,11 +374,15 @@ static int send_file(THD *thd) We need net_flush here because the client will not know it needs to send us the file name until it has processed the load event entry */ - if (unlikely(net_flush(net) || (packet_len = my_net_read(net)) == packet_error)) + if (unlikely(net_flush(net))) { + read_error: errmsg = "while reading file name"; goto err; } + packet_len= my_net_read(net); + if (unlikely(packet_len == packet_error)) + goto read_error; // terminate with \0 for fn_format *((char*)net->read_pos + packet_len) = 0; -- cgit v1.2.1