Skip to content

Commit

Permalink
build: Disable -Wstringop-overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Jul 24, 2024
1 parent 5a07c52 commit c57ef48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ add_project_arguments(
'-Wmissing-declarations', '-Wmissing-field-initializers', '-Wshadow',
'-Wsuggest-attribute=noreturn', '-Wswitch-enum', '-Wunused-function',
'-Wunused-label', '-Wunused-local-typedefs', '-Wunused-but-set-variable',
'-Wunused-but-set-parameter',
'-Wunused-but-set-parameter', '-Wno-stringop-overflow',
language: [ 'c', 'cpp' ])

add_project_arguments(
Expand Down
3 changes: 0 additions & 3 deletions poseidon/http/http_request_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ HTTP_Request_Parser::s_settings[1] =
+[](::http_parser* ps)
{
// Set the method string. This might not be null-terminated.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-truncation"
const char* method_str = ::http_method_str(static_cast<::http_method>(ps->method));
::strncpy(this->m_headers.method_bytes, method_str, sizeof(this->m_headers.method_bytes));
#pragma GCC diagnostic pop

// Convert header values from strings to their presumed form.
HTTP_Value value;
Expand Down

0 comments on commit c57ef48

Please sign in to comment.