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

fix(engine): fix warning about redundant std::move #2286

Merged
merged 1 commit into from
Nov 11, 2022

Conversation

LucaGuerra
Copy link
Contributor

@LucaGuerra LucaGuerra commented Nov 11, 2022

Signed-off-by: Luca Guerra luca@guerra.sh

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area engine

What this PR does / why we need it:

Fixes the following:

falco/userspace/engine/falco_engine.cpp: In member function ‘std::unique_ptr<falco::load_result> falco_engine::load_rules_file(const string&)’:                                                                
falco/userspace/engine/falco_engine.cpp:240:19: error: redundant move in return statement [-Werror=redundant-move]                                                                                             
  240 |   return std::move(res);                                                                                                                                                                                                              
      |          ~~~~~~~~~^~~~~                                                                                                                                                                                                               
falco/userspace/engine/falco_engine.cpp:240:19: note: remove ‘std::move’ call                                                                                                                                  

Necessary when compiling with warnings as errors.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

I could've sworn that I saw this fix already in another PR but I can't find it and it's not in master, so if there is already another PR open please tell me and I'll close this one.

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Luca Guerra <luca@guerra.sh>
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Nov 11, 2022

LGTM label has been added.

Git tree hash: 241da0d759ae4e4e0266e1485fd5d99d9f104bfc

@Andreagit97 Andreagit97 added this to the 0.34.0 milestone Nov 11, 2022
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Nov 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, LucaGuerra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit e3dbae3 into falcosecurity:master Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants