Skip to content

Commit c07c8aa

Browse files
committed
Suppress false positive from gcc
1 parent 6776ca3 commit c07c8aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/datadog/http_client.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ Expected<HTTPClient::URL> HTTPClient::URL::parse(StringView input) {
7575
std::string query;
7676
if (after_authority != StringView::npos) {
7777
StringView path_and_query = authority_and_path.substr(after_authority);
78+
#if defined(__GNUC__) && !defined(__clang__)
79+
#pragma GCC diagnostic push
80+
#pragma GCC diagnostic ignored "-Wstringop-overread"
81+
#endif
7882
const auto query_pos = path_and_query.find('?');
83+
#if defined(__GNUC__) && !defined(__clang__)
84+
#pragma GCC diagnostic pop
85+
#endif
7986
if (query_pos != StringView::npos) {
8087
path = std::string(path_and_query.substr(0, query_pos));
8188
query = std::string(path_and_query.substr(query_pos + 1));

0 commit comments

Comments
 (0)