From b334dbcdd8a6d6da348fb84b191eea01a575ec26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 23 Oct 2012 14:33:30 +0200 Subject: [PATCH 1/2] Remove a shadowed variable. This variable (ecl_kw) was only needed in an inner scope and re-declared there. --- examples/import_rewrite.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/import_rewrite.cpp b/examples/import_rewrite.cpp index ef652f70..b15b4516 100644 --- a/examples/import_rewrite.cpp +++ b/examples/import_rewrite.cpp @@ -112,7 +112,6 @@ static ecl_kw_type * loadFromcstdio( const std::string& filename , std::ios::pos static bool convertKeyword( const std::string& inputFile , const std::string& outputPath , std::ifstream& is , FieldType fieldType , std::ofstream& os ) { bool convert = true; ecl_type_enum ecl_type; - ecl_kw_type * ecl_kw; if (fieldType == Integer) ecl_type = ECL_INT_TYPE; From f8a11ef7e121fbb57ad710aaa28e18a91fa6aec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 23 Oct 2012 14:36:13 +0200 Subject: [PATCH 2/2] Staticise a file-local function. It is not needed outside this function. We should, arguably, be using an anonymous namespace in this case. --- examples/import_rewrite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/import_rewrite.cpp b/examples/import_rewrite.cpp index b15b4516..edf708e0 100644 --- a/examples/import_rewrite.cpp +++ b/examples/import_rewrite.cpp @@ -147,7 +147,7 @@ static bool convertKeyword( const std::string& inputFile , const std::string& ou -bool parseFile(const std::string& inputFile, std::string& outputFile, const std::string& indent = "") { +static bool parseFile(const std::string& inputFile, std::string& outputFile, const std::string& indent = "") { bool updateFile = false; std::cout << indent << "Parsing " << inputFile << "\n"; {