From 7a07a97c12cb766d692b33441a6edee820f9e740 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol <pespin@sysmocom.de> Date: Mon, 18 May 2020 16:04:50 +0200 Subject: [PATCH] TELNETasp_PT.cc: Fix sign of integer variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc 10.1.0 warns/errors about narrowing conversion: """ TELNETasp_PT.cc: In member function ‘void TELNETasp__PortType::TELNETasp__PT::recv_msg_from_client(int&)’: TELNETasp_PT.cc:1659:9: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing] 1659 | case -1:{ | ^ make[1]: *** [Makefile:180: TELNETasp_PT.o] Error 1 """ Signed-off-by: Pau Espin Pedrol <pespin@sysmocom.de> --- src/TELNETasp_PT.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TELNETasp_PT.cc b/src/TELNETasp_PT.cc index 59c67a8..9518690 100644 --- a/src/TELNETasp_PT.cc +++ b/src/TELNETasp_PT.cc @@ -1650,7 +1650,7 @@ void TELNETasp__PT::reset_configuration() void TELNETasp__PT::recv_msg_from_client(int &fd){ unsigned char inbuf[BUFFER_SIZE]; - unsigned int length; + int length; log_debug("%s: Receive message from client", port_name); length = recv(fd, inbuf, BUFFER_SIZE, O_NONBLOCK); -- GitLab