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

mission: fix warning about missing return #402

Merged
merged 1 commit into from
May 21, 2018
Merged

Conversation

julianoes
Copy link
Collaborator

@julianoes julianoes commented May 21, 2018

@JonasVautherin is this the right fix, or should we add an enum named UNKNOWN?

It's a bit silly but it seems the compiler doesn't realize that all cases are covered and we don't need default.

The warning with gcc 8.1.1 is:

/home/julianoes/src/DroneCore/plugins/mission/mission_item.cpp: In function ‘std::ostream& dronecore::operator<<(std::ostream&, const dronecore::MissionItem::CameraAction&)’:
/home/julianoes/src/DroneCore/plugins/mission/mission_item.cpp:187:1: warning: control reaches end of non-void function [-Wreturn-type]
 }

@julianoes julianoes requested a review from JonasVautherin May 21, 2018 13:39
Copy link
Collaborator

@JonasVautherin JonasVautherin left a comment

Choose a reason for hiding this comment

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

Yep, seems like the compiler needs some help here :-).

LGTM

@JonasVautherin JonasVautherin merged commit bdff78f into develop May 21, 2018
@JonasVautherin JonasVautherin deleted the fix-warning branch May 21, 2018 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants