diff --git a/include/wsrep/compiler.hpp b/include/wsrep/compiler.hpp index 126e25b..5adf0a9 100644 --- a/include/wsrep/compiler.hpp +++ b/include/wsrep/compiler.hpp @@ -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 #define WSREP_NOEXCEPT noexcept -#define WSREP_NORETURN [[noreturn]] #define WSREP_OVERRIDE override #else #define WSREP_NOEXCEPT -#define WSREP_NORETURN __attribute__((noreturn)) #define WSREP_OVERRIDE #endif // __cplusplus >= 201103L #define WSREP_UNUSED __attribute__((unused)) diff --git a/src/transaction.cpp b/src/transaction.cpp index 1a64dc1..4b8835f 100644 --- a/src/transaction.cpp +++ b/src/transaction.cpp @@ -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(),