[MDEV-19357] Fix compiler warnings on wsrep_mysqld.cc Created: 2019-04-29  Updated: 2019-04-29  Resolved: 2019-04-29

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Jan Lindström (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

sql/wsrep_mysqld.cc:1897:9: warning: variable 'ret' is used
      uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    if (thd->is_error() && !wsrep_must_ignore_error(thd))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sql/wsrep_mysqld.cc:1908:9: note: uninitialized use occurs here
    if (ret == 0)
        ^~~
sql/wsrep_mysqld.cc:1897:5: note: remove the 'if' if its
      condition is always false
    if (thd->is_error() && !wsrep_must_ignore_error(thd))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



 Comments   
Comment by Jan Lindström (Inactive) [ 2019-04-29 ]

Fixed on:

commit f0513de525863d9d1f6eac11fe98a737303ce2a6
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date: Mon Feb 11 10:10:55 2019 +0200

Generated at Thu Feb 08 08:51:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.