loolwsd/test/helpers.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 9c2743144e29136474bff7aca17ee303679c8872 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Tue May 10 23:51:49 2016 -0400 loolwsd: variable initialization Change-Id: I27c41c8d5c3f4cb555306a0da5a2475f93d5c49f Reviewed-on: https://gerrit.libreoffice.org/24870 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp index 138a724..376afb5 100644 --- a/loolwsd/test/helpers.hpp +++ b/loolwsd/test/helpers.hpp @@ -160,8 +160,7 @@ void getResponseMessage(Poco::Net::WebSocket& ws, const std::string& prefix, std { try { - int flags; - int bytes; + int flags = 0; int retries = 20; const Poco::Timespan waitTime(1000000); @@ -169,11 +168,11 @@ void getResponseMessage(Poco::Net::WebSocket& ws, const std::string& prefix, std ws.setReceiveTimeout(0); do { - char buffer[READ_BUFFER_SIZE]; if (ws.poll(waitTime, Poco::Net::Socket::SELECT_READ)) { - bytes = ws.receiveFrame(buffer, sizeof(buffer), flags); + char buffer[READ_BUFFER_SIZE]; + int bytes = ws.receiveFrame(buffer, sizeof(buffer), flags); if (bytes > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != Poco::Net::WebSocket::FRAME_OP_CLOSE) { std::cerr << "Got " << bytes << " bytes: " << LOOLProtocol::getAbbreviatedMessage(buffer, bytes) << std::endl; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits