From e14466aa66406da46da5dc70f94529ccfe6fb911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 18 Mar 2022 13:32:22 +0100 Subject: [PATCH] Fix -Wunused-but-set-variable in QTcpSocket documentation snippet Pick-to: 6.2 6.3 5.15 Task-number: QTBUG-101883 Change-Id: I54dc7229565cef199f306a0ac837a932aeb00ec6 Reviewed-by: Alexandru Croitor --- src/network/doc/snippets/network/tcpwait.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/doc/snippets/network/tcpwait.cpp b/src/network/doc/snippets/network/tcpwait.cpp index 1ccac0850b..4da258f197 100644 --- a/src/network/doc/snippets/network/tcpwait.cpp +++ b/src/network/doc/snippets/network/tcpwait.cpp @@ -50,7 +50,7 @@ #include -void test_tcpwait() +int test_tcpwait() { QTcpSocket socket; socket.connectToHost("localhost", 1025); @@ -69,4 +69,5 @@ void test_tcpwait() break; } //! [0] + return numReadTotal; }