Skip to content

Commit d0474c0

Browse files
David Wolstencroftmeta-codesync[bot]
authored andcommitted
fix conditional-uninitialized warnings
Summary: D92969284 promotes conditional-uninitialized to a compiler error fbobjc-wide. Initialize variables to safe defaults in wa-msys (_WCIZlib.c, _WAMTransportPrivateUtil.c), msys/mci (MCIGraphQLValidationUtils.c), mci/trace (MCITrace.c), and thrift (TBufferTransports.cpp). Reviewed By: ethansinjin Differential Revision: D93137196 fbshipit-source-id: 4b9ef480eb59234858fb98d9ad965a0fbcb4f9f3
1 parent 7ca596b commit d0474c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thrift/lib/cpp/transport/TBufferTransports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ bool TFramedTransport::readFrame(uint32_t /*minFrameSize*/) {
212212
// We can't use readAll(&sz, sizeof(sz)), since that always throws an
213213
// exception on EOF. We want to throw an exception only if EOF occurs after
214214
// partial size data.
215-
uint32_t sz;
215+
uint32_t sz = 0;
216216
uint32_t size_bytes_read = 0;
217217
while (size_bytes_read < sizeof(sz)) {
218218
uint8_t* szp = reinterpret_cast<uint8_t*>(&sz) + size_bytes_read;

0 commit comments

Comments
 (0)