From 4e9e750e35018c70c67a3b40abe8468c8244f716 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 31 Oct 2020 13:28:45 +0100 Subject: [PATCH] Initialize variables in native-wrapper. --- .../webextension/native-wrapper/remwharead_wrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser-plugins/webextension/native-wrapper/remwharead_wrapper.cpp b/browser-plugins/webextension/native-wrapper/remwharead_wrapper.cpp index 7787411..d3b8854 100644 --- a/browser-plugins/webextension/native-wrapper/remwharead_wrapper.cpp +++ b/browser-plugins/webextension/native-wrapper/remwharead_wrapper.cpp @@ -78,7 +78,7 @@ int main() Message::Message() { // Read message length. - uint32_t length; + uint32_t length{0}; char buffer[4]; cin.read(buffer, sizeof(length)); std::memcpy(&length, buffer, sizeof(length)); @@ -88,7 +88,7 @@ Message::Message() cin.ignore(1); // Read message. - char c; + char c{'\0'}; for (; length > 0; --length) { cin.read(&c, 1);