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

Shout.c : Add a missing c++14 fall through comment #4860

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/libshout-idjc/src/shout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ static int try_connect(shout_t *self)
}
#endif
self->state = SHOUT_STATE_REQ_CREATION;
/* fall through */
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we use the c++17 attribute? https://en.cppreference.com/w/cpp/language/attributes/fallthrough

Suggested change
/* fall through */
[[falltrough]];

Copy link
Member Author

Choose a reason for hiding this comment

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

I did this for the lowest impact.
I am afraid switching to c++17 may break something else.
All other places in the source use this comment and it is not our code.

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense.


case SHOUT_STATE_REQ_CREATION:
if ((rc = create_request(self)) != SHOUTERR_SUCCESS)
Expand Down