From 630e90b9cce817097c2d2142340560c46a53400a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 28 Oct 2016 22:45:40 +0200 Subject: [PATCH] ltsmin: fix constness of arguments as suggested by PVS-Studio For #192. * spot/ltsmin/ltsmin.cc (compile_model): Here. As remove some unused variable. --- spot/ltsmin/ltsmin.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spot/ltsmin/ltsmin.cc b/spot/ltsmin/ltsmin.cc index 6a0c85364..280606d3f 100644 --- a/spot/ltsmin/ltsmin.cc +++ b/spot/ltsmin/ltsmin.cc @@ -943,7 +943,7 @@ namespace spot // Call spins to compile "foo.prom" as "foo.prom.spins" if the latter // does not exist already or is older. static void - compile_model(std::string& filename, std::string& ext) + compile_model(std::string filename, const std::string& ext) { std::string command; std::string compiled_ext; @@ -969,7 +969,6 @@ namespace spot if (stat(filename.c_str(), &s) != 0) throw std::runtime_error(std::string("Cannot open ") + filename); - std::string old = filename; filename += compiled_ext; // Remove any directory, because the new file will