aboutsummaryrefslogtreecommitdiff
path: root/tests/test/script/runner/driver.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-03 15:58:11 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:37 +0200
commit57c7577fa91ffc024e5c696a91abe19f5547a787 (patch)
tree410a09a2d1ebf6da5e770b644c7a1806f2d1aef9 /tests/test/script/runner/driver.cxx
parentd933699b4dd106c227f8d07a2471d5f39f1c82af (diff)
Fix Clang and VC warnings
Diffstat (limited to 'tests/test/script/runner/driver.cxx')
-rw-r--r--tests/test/script/runner/driver.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test/script/runner/driver.cxx b/tests/test/script/runner/driver.cxx
index 10d5857..a82b083 100644
--- a/tests/test/script/runner/driver.cxx
+++ b/tests/test/script/runner/driver.cxx
@@ -38,17 +38,20 @@ main (int argc, char* argv[])
auto toi = [] (const string& s) -> int
{
+ int r (-1);
+
try
{
size_t n;
- int r (stoi (s, &n));
+ r = stoi (s, &n);
assert (n == s.size ());
- return r;
}
catch (const exception&)
{
assert (false);
}
+
+ return r;
};
if (o == "-i")