Initialise a variable to zero for GCC 7.2.0.
GCC 7.2.0 (in Release builds) can't figure out that |type| is always set: ../ssl/tls_record.cc: In function ‘bssl::OpenRecordResult bssl::OpenRecord(SSL*, bssl::Span<unsigned char>*, size_t*, uint8_t*, bssl::Span<unsigned char>)’: ../ssl/tls_record.cc:595:44: error: ‘type’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (type != SSL3_RT_APPLICATION_DATA && type != SSL3_RT_ALERT) { cc1plus: all warnings being treated as errors Change-Id: I1ca9683a18d89097288018f48b50991bce185da8 Reviewed-on: https://boringssl-review.googlesource.com/21724 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com>
This commit is contained in:
parent
1f1ac63bff
commit
771df4416a
@ -586,7 +586,7 @@ OpenRecordResult OpenRecord(SSL *ssl, Span<uint8_t> *out,
|
||||
}
|
||||
|
||||
Span<uint8_t> plaintext;
|
||||
uint8_t type;
|
||||
uint8_t type = 0;
|
||||
const ssl_open_record_t result = tls_open_record(
|
||||
ssl, &type, &plaintext, out_record_len, out_alert, in);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user