From 8763dbcccc48690fce6f01ce8166222bd8234a85 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 13 Sep 2022 23:44:19 +0200 Subject: Everywhere: Remove a bunch of dead write-only variables LLVM 15 now warns (and thus errors) about this, and there is really no point in keeping them. --- Userland/Libraries/LibTLS/HandshakeCertificate.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Userland/Libraries/LibTLS') diff --git a/Userland/Libraries/LibTLS/HandshakeCertificate.cpp b/Userland/Libraries/LibTLS/HandshakeCertificate.cpp index dd1bcfbad2..40bb4c6f1b 100644 --- a/Userland/Libraries/LibTLS/HandshakeCertificate.cpp +++ b/Userland/Libraries/LibTLS/HandshakeCertificate.cpp @@ -39,11 +39,9 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer) } size_t size = certificate_total_length; - size_t index = 0; bool valid_certificate = false; while (size > 0) { - ++index; if (buffer.size() - res < 3) { dbgln_if(TLS_DEBUG, "not enough data for certificate length"); return (i8)Error::NeedMoreData; @@ -58,14 +56,12 @@ ssize_t TLSv12::handle_certificate(ReadonlyBytes buffer) auto res_cert = res; auto remaining = certificate_size; - size_t certificates_in_chain = 0; do { if (remaining <= 3) { dbgln("Ran out of data"); break; } - ++certificates_in_chain; if (buffer.size() < (size_t)res_cert + 3) { dbgln("not enough data to read cert size ({} < {})", buffer.size(), res_cert + 3); break; -- cgit v1.2.3