Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
a596038
)
THRIFT-2040 "uninitialized variable" warnings on MSVC/windows
author
Roger Meier
<roger@apache.org>
Fri, 6 Dec 2013 19:47:39 +0000
(20:47 +0100)
committer
Roger Meier
<roger@apache.org>
Fri, 6 Dec 2013 19:47:39 +0000
(20:47 +0100)
Patch: Konrad Grochowski
lib/cpp/src/thrift/transport/TBufferTransports.cpp
patch
|
blob
|
history
diff --git
a/lib/cpp/src/thrift/transport/TBufferTransports.cpp
b/lib/cpp/src/thrift/transport/TBufferTransports.cpp
index
a307748
..
d819868
100644
(file)
--- a/
lib/cpp/src/thrift/transport/TBufferTransports.cpp
+++ b/
lib/cpp/src/thrift/transport/TBufferTransports.cpp
@@
-175,7
+175,7
@@
bool TFramedTransport::readFrame() {
// We can't use readAll(&sz, sizeof(sz)), since that always throws an
// exception on EOF. We want to throw an exception only if EOF occurs after
// partial size data.
- int32_t sz;
+ int32_t sz
= -1
;
uint32_t size_bytes_read = 0;
while (size_bytes_read < sizeof(sz)) {
uint8_t* szp = reinterpret_cast<uint8_t*>(&sz) + size_bytes_read;