-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings removed, codestyle fixes #95
Conversation
@@ -17,9 +17,7 @@ TIGHTDB_NORETURN void Thread::create_failed(int err) | |||
|
|||
TIGHTDB_NORETURN void Thread::join_failed(int err) | |||
{ | |||
switch (err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces a warning, because 'err' is no longer used. I put it in a switch, because that adheres to the form of a lot of similar constructs nearby.
I guess you made this change because your compiler gave a warning about this "redundant" switch statement. In that case, please add static_cast<void>(err) or some similar trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - just tested on Linux and got the new warning :-)
Mvh
/Brian
Den 17/05/2013 kl. 00.29 skrev Kristian Spangsege notifications@github.com:
In src/tightdb/thread.cpp:
@@ -17,9 +17,7 @@ TIGHTDB_NORETURN void Thread::create_failed(int err)
TIGHTDB_NORETURN void Thread::join_failed(int err)
{
- switch (err) {
This change introduces a warning, because 'err' is no longer used. I put in a switch, because that adheres the form of a lot of similar constructs nearby.I guess you made this change because your compiler gave a warning about this "redundant" switch statement. In that case, please add static_cast(err) or some similar trick.
—
Reply to this email directly or view it on GitHub.
@@ -42,7 +42,7 @@ void ArrayStringLong::add(StringData value) | |||
m_blob.add(value.data(), value.size(), add_zero_term); | |||
size_t end = value.size() + 1; | |||
if (!m_offsets.is_empty()) | |||
end += m_offsets.back(); | |||
end += m_offsets.back(); // FIXME: fix warning about type mismatch here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just use the ToSizeT() function on m_offsets.back()
Conflicts: TightDB.vcxproj.filters src/tightdb/query_engine.hpp
Warnings removed, codestyle fixes
@rrrlasse, @kspangsege