Skip to content
Snippets Groups Projects
Commit 066dde85 authored by Adrien Béraud's avatar Adrien Béraud Committed by Adrien Béraud
Browse files

fileutils: avoid using uninitialized value

Change-Id: If76e9c0b81a53a83b19a2e833e2a3a94870102fe
parent cd0007a1
No related branches found
No related tags found
No related merge requests found
...@@ -1044,9 +1044,9 @@ ofstream(const std::string& path, std::ios_base::openmode mode) ...@@ -1044,9 +1044,9 @@ ofstream(const std::string& path, std::ios_base::openmode mode)
int64_t int64_t
size(const std::string& path) size(const std::string& path)
{ {
std::ifstream file; int64_t size = 0;
int64_t size;
try { try {
std::ifstream file;
openStream(file, path, std::ios::binary | std::ios::in); openStream(file, path, std::ios::binary | std::ios::in);
file.seekg(0, std::ios_base::end); file.seekg(0, std::ios_base::end);
size = file.tellg(); size = file.tellg();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment