@@ -89,10 +89,10 @@ void udp_server::end_serving() {
8989 // gracefully close the socket; this will eventually lead to the cancellation of the IO
9090 // operation(s) tied to its socket
9191 auto sock (socket_); // socket shared ptr to be kept alive
92- post (io_, [sock]() {
92+ post (io_, [sock, fn = __func__ ]() {
9393 try {
9494 if (sock->is_open ()) sock->close ();
95- } catch (std::exception &e) { LOG_F (ERROR, " Error during %s: %s" , __func__ , e.what ()); }
95+ } catch (std::exception &e) { LOG_F (ERROR, " Error during %s: %s" , fn , e.what ()); }
9696 });
9797}
9898
@@ -125,7 +125,7 @@ void udp_server::process_shortinfo_request(std::istream& request_stream)
125125 string_p replymsg (
126126 std::make_shared<std::string>((query_id += " \r\n " ) += shortinfo_msg_));
127127 socket_->async_send_to (asio::buffer (*replymsg), return_endpoint,
128- [shared_this = shared_from_this (), replymsg](err_t err_, std::size_t ) {
128+ [shared_this = shared_from_this (), replymsg](err_t err_, std::size_t /* unused */ ) {
129129 if (err_ != asio::error::operation_aborted && err_ != asio::error::shut_down)
130130 shared_this->request_next_packet ();
131131 });
@@ -147,7 +147,7 @@ void udp_server::process_timedata_request(std::istream &request_stream, double t
147147 reply << ' ' << wave_id << ' ' << t0 << ' ' << t1 << ' ' << lsl_clock ();
148148 string_p replymsg (std::make_shared<std::string>(reply.str ()));
149149 socket_->async_send_to (asio::buffer (*replymsg), remote_endpoint_,
150- [shared_this = shared_from_this (), replymsg](err_t err_, std::size_t ) {
150+ [shared_this = shared_from_this (), replymsg](err_t err_, std::size_t /* unused */ ) {
151151 if (err_ != asio::error::operation_aborted && err_ != asio::error::shut_down)
152152 shared_this->request_next_packet ();
153153 });
0 commit comments