Some compilers complain that wait_gp_seq might be used uninitialized
in nocb_gp_wait(). This cannot actually happen because when wait_gp_seq
is uninitialized, needwait_gp must be false, which prevents wait_gp_seq
from being used. But this analysis is apparently beyond some compilers,
so this commit adds a bogus initialization of wait_gp_seq for the sole
purpose of suppressing the false-positive warning.
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
unsigned long cur_gp_seq;
unsigned long flags;
bool gotcbs;
- bool needwait_gp = false;
+ bool needwait_gp = false; // This prevents actual uninitialized use.
bool needwake;
bool needwake_gp;
struct rcu_data *rdp;
struct rcu_node *rnp;
- unsigned long wait_gp_seq;
+ unsigned long wait_gp_seq = 0; // Suppress "use uninitialized" warning.
/*
* Each pass through the following loop checks for CBs and for the