Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitab56ec4

Browse files
committed
Build: fix GCC 7 implicit fallthrough warnings
Fromhttps://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:>C++17 provides a standard way to suppress the -Wimplicit-fallthroughwarning using [[fallthrough]]; instead of the GNU attribute. In C++11 orC++14 users can use [[gnu::fallthrough]];, which is a GNU extension.Instead of these attributes, it is also possible to add a fallthroughcomment to silence the warning.
1 parentb930b8e commitab56ec4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ struct http_async_connection
273273
if (!parsed_ok ||indeterminate(parsed_ok)) {
274274
return;
275275
}
276+
// fall-through
276277
case status:
277278
if (ec == boost::asio::error::eof)return;
278279
parsed_ok =this->parse_status(
@@ -286,6 +287,7 @@ struct http_async_connection
286287
if (!parsed_ok ||indeterminate(parsed_ok)) {
287288
return;
288289
}
290+
// fall-through
289291
case status_message:
290292
if (ec == boost::asio::error::eof)return;
291293
parsed_ok =this->parse_status_message(
@@ -298,6 +300,7 @@ struct http_async_connection
298300
if (!parsed_ok ||indeterminate(parsed_ok)) {
299301
return;
300302
}
303+
// fall-through
301304
case headers:
302305
if (ec == boost::asio::error::eof)return;
303306
// In the following, remainder is the number of bytes that remain in
@@ -456,13 +459,17 @@ struct http_async_connection
456459
switch (state) {
457460
case version:
458461
this->version_promise.set_exception(std::make_exception_ptr(error));
462+
// fall-through
459463
case status:
460464
this->status_promise.set_exception(std::make_exception_ptr(error));
465+
// fall-through
461466
case status_message:
462467
this->status_message_promise.set_exception(
463468
std::make_exception_ptr(error));
469+
// fall-through
464470
case headers:
465471
this->headers_promise.set_exception(std::make_exception_ptr(error));
472+
// fall-through
466473
case body:
467474
if (!callback) {
468475
// N.B. if callback is non-null, then body_promise has already been
@@ -473,6 +480,7 @@ struct http_async_connection
473480
else
474481
callback(char_const_range(), report_code );
475482
break;
483+
// fall-through
476484
default:
477485
BOOST_ASSERT(false &&"Bug, report this to the developers!");
478486
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp