trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [13/14] trafficserver git commit: TS-3822 clang-analyzer: Value stored to 'stream' during its initialization is never read
Date Thu, 06 Aug 2015 04:06:49 GMT
TS-3822 clang-analyzer: Value stored to 'stream' during its initialization is never read


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/55976641
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/55976641
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/55976641

Branch: refs/heads/6.0.x
Commit: 559766411410f36a82f28632f8308cc2d20e74b0
Parents: 8939a3c
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Wed Aug 5 21:25:17 2015 -0600
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Wed Aug 5 21:25:17 2015 -0600

----------------------------------------------------------------------
 proxy/http2/Http2ConnectionState.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55976641/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 4244468..3d94dfd 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -173,13 +173,13 @@ rcv_headers_frame(Http2ClientSession &cs, Http2ConnectionState &cstate,
const Ht
     return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_PROTOCOL_ERROR);
   }
 
-  Http2Stream *stream = cstate.find_stream(id);
   if (id <= cstate.get_latest_stream_id()) {
     return Http2Error(HTTP2_ERROR_CLASS_STREAM, HTTP2_ERROR_STREAM_CLOSED);
   }
 
   // Create new stream
-  stream = cstate.create_stream(id);
+  Http2Stream *stream = cstate.create_stream(id);
+
   if (!stream) {
     return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, HTTP2_ERROR_PROTOCOL_ERROR);
   }


Mime
View raw message