From 082019e7a1081462ecbf6f68b9368a72d9091028 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 13 Feb 2018 12:22:56 +0100 Subject: [PATCH] [BL] Initialization fix. --- BaseLib/FileTools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp index bd04d8b0e25..7ed7c38676a 100644 --- a/BaseLib/FileTools.cpp +++ b/BaseLib/FileTools.cpp @@ -25,7 +25,7 @@ namespace BaseLib */ bool IsFileExisting(const std::string &strFilename) { - struct stat buffer; + struct stat buffer {}; return (stat (strFilename.c_str(), &buffer) == 0); } @@ -35,7 +35,7 @@ double swapEndianness(double const& v) { double v; char c[sizeof(double)]; - } a, b; + } a {}, b {}; a.v = v; for (unsigned short i = 0; i < sizeof(double)/2; i++) -- GitLab