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:
@ -37,13 +37,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L && !(__GNUC__ == 4 && __GNUG_MINOR__ < 8)
|
||||||
|
#define WSREP_NORETURN [[noreturn]]
|
||||||
|
#else
|
||||||
|
#define WSREP_NORETURN __attribute__((noreturn))
|
||||||
|
#endif // __cplusplus >= 201103L && !(__GNUC__ == 4 && __GNUG_MINOR__ < 8)
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
#define WSREP_NOEXCEPT noexcept
|
#define WSREP_NOEXCEPT noexcept
|
||||||
#define WSREP_NORETURN [[noreturn]]
|
|
||||||
#define WSREP_OVERRIDE override
|
#define WSREP_OVERRIDE override
|
||||||
#else
|
#else
|
||||||
#define WSREP_NOEXCEPT
|
#define WSREP_NOEXCEPT
|
||||||
#define WSREP_NORETURN __attribute__((noreturn))
|
|
||||||
#define WSREP_OVERRIDE
|
#define WSREP_OVERRIDE
|
||||||
#endif // __cplusplus >= 201103L
|
#endif // __cplusplus >= 201103L
|
||||||
#define WSREP_UNUSED __attribute__((unused))
|
#define WSREP_UNUSED __attribute__((unused))
|
||||||
|
@ -1067,9 +1067,15 @@ int wsrep::transaction::commit_or_rollback_by_xid(const wsrep::xid& xid,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int flags(commit ?
|
int flags(0);
|
||||||
wsrep::provider::flag::commit :
|
if (commit)
|
||||||
wsrep::provider::flag::rollback);
|
{
|
||||||
|
flags = wsrep::provider::flag::commit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flags = wsrep::provider::flag::rollback;
|
||||||
|
}
|
||||||
flags = flags | wsrep::provider::flag::pa_unsafe;
|
flags = flags | wsrep::provider::flag::pa_unsafe;
|
||||||
wsrep::stid stid(sa->transaction().server_id(),
|
wsrep::stid stid(sa->transaction().server_id(),
|
||||||
sa->transaction().id(),
|
sa->transaction().id(),
|
||||||
|
Reference in New Issue
Block a user