Skip to content
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

Merged
merged 5 commits into from
May 17, 2013
Merged

Warnings removed, codestyle fixes #95

merged 5 commits into from
May 17, 2013

Conversation

bmunkholm
Copy link
Contributor

@ghost ghost assigned kspangsege May 16, 2013
@@ -17,9 +17,7 @@ TIGHTDB_NORETURN void Thread::create_failed(int err)

TIGHTDB_NORETURN void Thread::join_failed(int err)
{
switch (err) {
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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()

Brian Munkholm added 2 commits May 17, 2013 14:00
Conflicts:
	TightDB.vcxproj.filters
	src/tightdb/query_engine.hpp
bmunkholm pushed a commit that referenced this pull request May 17, 2013
Warnings removed, codestyle fixes
@bmunkholm bmunkholm merged commit bd651ae into realm:master May 17, 2013
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants