-
-
usr/src/lib/sun_fc/common/Handle.cc (Diff revision 1) Since
unlock()
cannot throw an exception I suggest to move theunlock()
calls out of the try-catch block. -
usr/src/lib/sun_fc/common/Listener.cc (Diff revision 1) In a case the exception was thrown (and catched) in the above try-catch block, this will cause double unlock.
8399 sun_fc: in C++11 destructors default to noexcept
Review Request #589 — Created June 15, 2017 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
8399 | |
6b65b57... | |
Reviewers | |
general | |
../common/Handle.cc: In destructor 'Handle::~Handle()': ../common/Handle.cc:172:6: error: throw will always call terminate() [-Werror=terminate] throw; ^~~~~ ../common/Handle.cc:172:6: note: in C++11 destructors default to noexcept ../common/Handle.cc:187:6: error: throw will always call terminate() [-Werror=terminate] throw; ^~~~~ ../common/Handle.cc:187:6: note: in C++11 destructors default to noexcept cc1plus: all warnings being treated as errors
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+3 -10) |
Change Summary:
unlock() was called with wrong argument.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+3 -10) |
-
-
usr/src/lib/sun_fc/common/Handle.cc (Diff revision 3) By C++11 you also need to declare
unlock()
andlock()
inclass Lockable
as noexcept,
i.e. directly specify that lock/unlock cannot throw exception.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+18 -18) |
Change Summary:
Reverted to different approach - set the -std. The reason is also simple - the changes in C++ standard(s) do change the behavior, and my C++ skills are quite rusty and I have no time to deal woth those bits in proper detail, so this will allow us to preserve status quo for time being.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+2 -2) |