From c1565e1ff7bcb96e53234860543005cf103b56f5 Mon Sep 17 00:00:00 2001 From: Damian Jarek Date: Sun, 7 Jul 2019 16:58:00 +0200 Subject: [PATCH] Fix missing initializer warning in `basic_fields` clang complains about missing initializer (even though the field was properly initialized by the default constructor). Signed-off-by: Damian Jarek --- CHANGELOG.md | 1 + include/boost/beast/http/impl/fields.hpp | 2 +- include/boost/beast/http/impl/fields.ipp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c7f41a..9c4fb064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 264: * Handle overflow in max size calculation in `basic_dynamic_body` * Fix unused variable warnings in tests +* Fix missing initializer warning in `basic_fields` -------------------------------------------------------------------------------- diff --git a/include/boost/beast/http/impl/fields.hpp b/include/boost/beast/http/impl/fields.hpp index 0788e59e..2711df38 100644 --- a/include/boost/beast/http/impl/fields.hpp +++ b/include/boost/beast/http/impl/fields.hpp @@ -916,7 +916,7 @@ set_chunked_impl(bool value) if(it == end()) return; - detail::filter_token_list_last(buf, it->value(), {"chunked"}); + detail::filter_token_list_last(buf, it->value(), {"chunked", {}}); if(! buf.empty()) set(field::transfer_encoding, buf.view()); else diff --git a/include/boost/beast/http/impl/fields.ipp b/include/boost/beast/http/impl/fields.ipp index 9a41d977..379d0a4d 100644 --- a/include/boost/beast/http/impl/fields.ipp +++ b/include/boost/beast/http/impl/fields.ipp @@ -95,7 +95,7 @@ keep_alive_impl( if(keep_alive) { // remove close - filter_token_list(s, value, iequals_predicate{"close"}); + filter_token_list(s, value, iequals_predicate{"close", {}}); // add keep-alive if(s.empty()) s.append("keep-alive"); @@ -120,7 +120,7 @@ keep_alive_impl( else { // remove keep-alive - filter_token_list(s, value, iequals_predicate{"keep-alive"}); + filter_token_list(s, value, iequals_predicate{"keep-alive", {}}); // add close if(s.empty()) s.append("close");