aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-04 17:32:49 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-04 17:32:49 +0300
commita7090df74b06d6e5221c17a176b7cbadef8da478 (patch)
tree2696bfa46a5c2a38420779941755e4a1d944dc41
parent8a8a1a739a34607bd72f7f1a9a105e91ebc0b483 (diff)
Fix 'may be used uninitialized' GCC 8.3 warning
-rw-r--r--libbutl/fdstream.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbutl/fdstream.cxx b/libbutl/fdstream.cxx
index e5b2a19..2d3ca45 100644
--- a/libbutl/fdstream.cxx
+++ b/libbutl/fdstream.cxx
@@ -521,9 +521,11 @@ namespace butl
if (non_blocking_)
throw_generic_ios_failure (ENOTSUP);
- // Translate ios_base value to to fdseek_mode.
+ // Translate ios_base::seekdir value to fdseek_mode. Note:
+ // ios_base::seekdir is an implementation-defined type and is not
+ // necessarily a enum.
//
- fdseek_mode m;
+ fdseek_mode m (fdseek_mode::set);
switch (dir)
{
case ios_base::beg: m = fdseek_mode::set; break;