Skip to content

Commit

Permalink
Fix warnings in json_client example
Browse files Browse the repository at this point in the history
  • Loading branch information
ashtum committed Sep 19, 2024
1 parent 3ddcf4e commit 7ce0ebe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions example/http/client/body/json_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ struct json_body
{
using const_buffers_type = boost::asio::const_buffer;
template<bool isRequest, class Fields>
writer(boost::beast::http::header<isRequest, Fields> const& h,
value_type const& body)
writer(
boost::beast::http::header<isRequest, Fields> const&,
value_type const& body)
{
// The serializer holds a pointer to the value, so all we need to do is to reset it.
serializer.reset(&body);
Expand Down Expand Up @@ -65,7 +66,9 @@ struct json_body
struct reader
{
template<bool isRequest, class Fields>
reader(boost::beast::http::header<isRequest, Fields>& h, value_type& body)
reader(
boost::beast::http::header<isRequest, Fields>&,
value_type& body)
: body(body)
{
}
Expand Down
2 changes: 1 addition & 1 deletion example/http/client/body/json_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace http = beast::http; // from <boost/beast/http.hpp>
namespace net = boost::asio; // from <boost/asio.hpp>
using tcp = net::ip::tcp; // from <boost/asio/ip/tcp.hpp>

int main(int argc, char ** argv)
int main(int, char **)
{
// Our test endpoint for testing the json
const auto host = "postman-echo.com";
Expand Down

0 comments on commit 7ce0ebe

Please sign in to comment.