And solve error: 'assert_exclusive_lock' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'void *'
by introducing an abstract base Lock
class.
Builds on #14920.
When configured with --enable-isystem.
Was necessary to split QT_INCLUDES into QT_INCLUDES and
QT_MOC_INCLUDES because moc does not understand -isystem, e.g.:
Unknown options: isystem/usr/local/Cellar/qt/5.10.0_1/include/QtNetwork[...]
This does not convert all uses, but focuses on libraries which have triggered
warnings/errors when applying initial additional build checks: QT, Univalue, and Berkeley DB.
LevelDb requires additional measures as its code is compiled with the project warnings
via AM_CXXFLAGS.
Note -isystem should not be applied to /usr/include, see BITCOIN_SYSTEM_INCLUDE
for a helper to convert -I to -isystem with /usr/include excepted.
-Werror=documentation if isystem & werror are enabled.
And solve associated error:
In file included from sync.cpp:5:
./sync.h:66:106: error: 'assert_exclusive_lock' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'void *' [-Werror,-Wthread-safety-attributes]
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) ASSERT_EXCLUSIVE_LOCK(cs) {}
^
./threadsafety.h:34:49: note: expanded from macro 'ASSERT_EXCLUSIVE_LOCK'
#define ASSERT_EXCLUSIVE_LOCK(...) __attribute((assert_exclusive_lock(__VA_ARGS__)))
^
In file included from threadinterrupt.cpp:6:
In file included from ./threadinterrupt.h:8:
./sync.h:66:106: error: 'assert_exclusive_lock' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'void *' [-Werror,-Wthread-safety-attributes]
void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) ASSERT_EXCLUSIVE_LOCK(cs) {}
^
./threadsafety.h:34:49: note: expanded from macro 'ASSERT_EXCLUSIVE_LOCK'
#define ASSERT_EXCLUSIVE_LOCK(...) __attribute((assert_exclusive_lock(__VA_ARGS__)))
^
1 error generated.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Labels
Build system