From 494d4d36237f37c455f6689fca280ed75498403a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 5 Apr 2012 10:26:23 +0200 Subject: Verious warnings generated by SunStudio fixed Signed-off-by: Martin Sustrik --- src/req.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/req.cpp') diff --git a/src/req.cpp b/src/req.cpp index 2e0e614..0094929 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -77,6 +77,8 @@ int xs::req_t::xsend (msg_t *msg_, int flags_) int xs::req_t::xrecv (msg_t *msg_, int flags_) { + int rc; + // If request wasn't send, we can't wait for reply. if (!receiving_reply) { errno = EFSM; @@ -92,7 +94,7 @@ int xs::req_t::xrecv (msg_t *msg_, int flags_) // TODO: This should also close the connection with the peer! if (unlikely (!(msg_->flags () & msg_t::more) || msg_->size () != 0)) { while (true) { - int rc = xreq_t::xrecv (msg_, flags_); + rc = xreq_t::xrecv (msg_, flags_); errno_assert (rc == 0); if (!(msg_->flags () & msg_t::more)) break; @@ -106,7 +108,7 @@ int xs::req_t::xrecv (msg_t *msg_, int flags_) message_begins = false; } - int rc = xreq_t::xrecv (msg_, flags_); + rc = xreq_t::xrecv (msg_, flags_); if (rc != 0) return rc; -- cgit v1.2.3