1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-24 10:42:31 +03:00

Work around GCC 12 warning of uninitialized use

Use pointers to pass state objects to service constructors
to work around GCC 12 warning

  error: member ‘wsrep::mock_storage_service::client_state_’
  is used uninitialized
This commit is contained in:
Teemu Ollakka
2023-02-26 10:31:07 +02:00
parent 9e8708af7e
commit 3b3429d8df
10 changed files with 46 additions and 42 deletions

View File

@ -24,11 +24,11 @@
int wsrep::mock_client_service::bf_rollback()
{
int ret(0);
if (client_state_.before_rollback())
if (client_state_->before_rollback())
{
ret = 1;
}
else if (client_state_.after_rollback())
else if (client_state_->after_rollback())
{
ret = 1;
}
@ -38,11 +38,11 @@ int wsrep::mock_client_service::bf_rollback()
enum wsrep::provider::status
wsrep::mock_client_service::replay()
{
wsrep::mock_high_priority_service hps(client_state_.server_state(),
&client_state_, true);
wsrep::mock_high_priority_service hps(client_state_->server_state(),
client_state_, true);
enum wsrep::provider::status ret(
client_state_.provider().replay(
client_state_.transaction().ws_handle(),
client_state_->provider().replay(
client_state_->transaction().ws_handle(),
&hps));
++replays_;
return ret;