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

Change ErrorBase::takeUnderlyingError to non const #6483

Merged

Conversation

Smjert
Copy link
Member

@Smjert Smjert commented Jun 5, 2020

Fix a build error with newer LLVM/Clang (11), as found on
oss-fuzz.

The member function returns a member variable via std::move,
but the member function is marked as const.
Since that variable to be actually moved would require
the class instance to be non const, a copy is used instead;
the return type has its copy constructor deleted though,
so this is always incorrect and removing the const qualifier
is the solution.

Fix a build error with newer LLVM/Clang (11), as found on
oss-fuzz.

The member function returns a member variable via std::move,
but the member function is marked as const.
Since that variable to be actually moved would require
the class instance to be non const, a copy is used instead;
the return type has its copy constructor deleted though,
so this is always incorrect and removing the const qualifier
is the solution.
@Smjert Smjert added build oss-fuzz Issues related to integrations with oss-fuzz. bug labels Jun 5, 2020
@theopolis theopolis merged commit ad6b8fa into osquery:master Jun 6, 2020
@Smjert Smjert deleted the stefano/build/move-from-const branch June 26, 2020 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build oss-fuzz Issues related to integrations with oss-fuzz.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants