1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Fixed compilation errors with GCC 4.7

- Do not use [[noreturn]] with GCC older than 4.8.
- Use if/else instead of ternary operator in transaction
  commit_or_rollback_by_xid() to avoid debug build failure with
  GCC 4.7.
This commit is contained in:
Teemu Ollakka
2019-10-28 16:44:35 +02:00
parent 5ca8e4780e
commit c9513bd2e4
2 changed files with 15 additions and 5 deletions

View File

@ -1067,9 +1067,15 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
return 1;
}
int flags(commit ?
wsrep::provider::flag::commit :
wsrep::provider::flag::rollback);
int flags(0);
if (commit)
{
flags = wsrep::provider::flag::commit;
}
else
{
flags = wsrep::provider::flag::rollback;
}
flags = flags | wsrep::provider::flag::pa_unsafe;
wsrep::stid stid(sa->transaction().server_id(),
sa->transaction().id(),