Fixed warning with gcc 6 [#METR-2944].

This commit is contained in:
Alexey Milovidov 2016-09-19 09:24:18 +03:00
parent 2dd04b39f7
commit 365be3c026
2 changed files with 4 additions and 5 deletions

View File

@ -49,9 +49,8 @@ private:
~IConv()
{
if (-1 == iconv_close(impl)) /// throwing exception leads to std::terminate and it's ok.
throwFromErrno("Cannot iconv_close",
ErrorCodes::LOGICAL_ERROR);
if (-1 == iconv_close(impl))
std::terminate();
}
};

View File

@ -282,8 +282,8 @@ struct CurrentlyMergingPartsTagger
for (const auto & part : parts)
{
if (!storage->currently_merging.count(part)) /// leads to std::terminate, that's Ok.
throw Exception("Untagging already untagged part " + part->name + ". This is a bug.", ErrorCodes::LOGICAL_ERROR);
if (!storage->currently_merging.count(part))
std::terminate();
storage->currently_merging.erase(part);
}
}