diff --git a/opm/parser/eclipse/Applications/opm-eclkw.cpp b/opm/parser/eclipse/Applications/opm-eclkw.cpp index cf35462f2..ae1b380c9 100644 --- a/opm/parser/eclipse/Applications/opm-eclkw.cpp +++ b/opm/parser/eclipse/Applications/opm-eclkw.cpp @@ -26,7 +26,7 @@ #include -void printKeyword(Opm::ParserKeywordConstPtr keyword) +static void printKeyword(Opm::ParserKeywordConstPtr keyword) { std::string indent = " "; std::cout << keyword->getName() << std::endl; @@ -53,7 +53,7 @@ void printKeyword(Opm::ParserKeywordConstPtr keyword) } } -void printItem(Opm::ParserItemConstPtr item, std::string indent) +static void printItem(Opm::ParserItemConstPtr item, std::string indent) { std::cout << indent << item->name() << std::endl; if (item->getDescription().length() > 0) { @@ -66,7 +66,7 @@ void printItem(Opm::ParserItemConstPtr item, std::string indent) std::cout << std::endl; } -void printItems(Opm::ParserKeywordConstPtr keyword) +static void printItems(Opm::ParserKeywordConstPtr keyword) { std::string indent = " "; std::cout << std::endl; @@ -78,7 +78,7 @@ void printItems(Opm::ParserKeywordConstPtr keyword) } } -void printKeywords (Opm::ParserPtr parser, std::vector& keywords) +static void printKeywords (Opm::ParserPtr parser, std::vector& keywords) { for (auto iterator = keywords.begin(); iterator != keywords.end(); ++iterator) { Opm::ParserKeywordConstPtr keyword = parser->getKeyword(*iterator); @@ -87,7 +87,7 @@ void printKeywords (Opm::ParserPtr parser, std::vector& keywords) } } -bool parseCommandLineForAllKeywordsOption(char** argv) +static bool parseCommandLineForAllKeywordsOption(char** argv) { bool allKeywords = false; std::string arg(argv[1]); @@ -97,7 +97,7 @@ bool parseCommandLineForAllKeywordsOption(char** argv) return allKeywords; } -std::vector createListOfKeywordsToDescribe(char** argv, bool allKeywords, Opm::ParserPtr parser) +static std::vector createListOfKeywordsToDescribe(char** argv, bool allKeywords, Opm::ParserPtr parser) { std::vector keywords; if (allKeywords) { diff --git a/opm/parser/eclipse/Applications/opm-eclkwtest.cpp b/opm/parser/eclipse/Applications/opm-eclkwtest.cpp index af207ed2a..5f1219701 100644 --- a/opm/parser/eclipse/Applications/opm-eclkwtest.cpp +++ b/opm/parser/eclipse/Applications/opm-eclkwtest.cpp @@ -22,7 +22,7 @@ #include -void printDeckDiagnostics(Opm::DeckConstPtr deck, bool printAllKeywords) { +static void printDeckDiagnostics(Opm::DeckConstPtr deck, bool printAllKeywords) { int recognizedKeywords = 0; int unrecognizedKeywords = 0; diff --git a/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp b/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp index 960882c6f..af2603a22 100644 --- a/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp +++ b/opm/parser/eclipse/EclipseState/Grid/tests/EclipseGridTests.cpp @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(CreateMissingDIMENS_throws) { -Opm::DeckPtr createDeckHeaders() { +static Opm::DeckPtr createDeckHeaders() { const char *deckData = "RUNSPEC\n" "\n" @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(HasGridKeywords) { BOOST_CHECK( !Opm::EclipseGrid::hasCartesianKeywords( gridSection )); } -Opm::DeckPtr createCPDeck() { +static Opm::DeckPtr createCPDeck() { const char *deckData = "RUNSPEC\n" "\n" @@ -93,7 +93,7 @@ Opm::DeckPtr createCPDeck() { } -Opm::DeckPtr createCARTDeck() { +static Opm::DeckPtr createCARTDeck() { const char *deckData = "RUNSPEC\n" "\n" @@ -116,7 +116,7 @@ Opm::DeckPtr createCARTDeck() { } -Opm::DeckPtr createCARTDeckDEPTHZ() { +static Opm::DeckPtr createCARTDeckDEPTHZ() { const char *deckData = "RUNSPEC\n" "\n" @@ -139,7 +139,7 @@ Opm::DeckPtr createCARTDeckDEPTHZ() { } -Opm::DeckPtr createCARTInvalidDeck() { +static Opm::DeckPtr createCARTInvalidDeck() { const char *deckData = "RUNSPEC\n" "\n" @@ -218,7 +218,7 @@ BOOST_AUTO_TEST_CASE(CreateMissingGRID_throws) { } -Opm::DeckPtr createInvalidDXYZCARTDeck() { +static Opm::DeckPtr createInvalidDXYZCARTDeck() { const char *deckData = "RUNSPEC\n" "\n" @@ -250,7 +250,7 @@ BOOST_AUTO_TEST_CASE(CreateCartesianGRID) { } -Opm::DeckPtr createInvalidDXYZCARTDeckDEPTHZ() { +static Opm::DeckPtr createInvalidDXYZCARTDeckDEPTHZ() { const char *deckData = "RUNSPEC\n" "\n" @@ -282,7 +282,7 @@ BOOST_AUTO_TEST_CASE(CreateCartesianGRIDDEPTHZ) { } -Opm::DeckPtr createOnlyTopDZCartGrid() { +static Opm::DeckPtr createOnlyTopDZCartGrid() { const char *deckData = "RUNSPEC\n" "\n" @@ -305,7 +305,7 @@ Opm::DeckPtr createOnlyTopDZCartGrid() { } -Opm::DeckPtr createInvalidDEPTHZDeck1 () { +static Opm::DeckPtr createInvalidDEPTHZDeck1 () { const char *deckData = "RUNSPEC\n" "\n" @@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(CreateCartesianGRIDInvalidDEPTHZ1) { } -Opm::DeckPtr createInvalidDEPTHZDeck2 () { +static Opm::DeckPtr createInvalidDEPTHZDeck2 () { const char *deckData = "RUNSPEC\n" "\n" diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp index 9f41dd46c..2339cc48b 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp @@ -31,7 +31,7 @@ #include #include -Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { +static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); for (size_t i = 0; i < numDays; i++) diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp index e3073d17e..ddf057400 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp @@ -33,7 +33,7 @@ using namespace Opm; -DeckPtr createDeck() { +static DeckPtr createDeck() { Opm::Parser parser; std::string input = "START\n" @@ -45,7 +45,7 @@ DeckPtr createDeck() { return parser.parseString(input); } -DeckPtr createDeckWithWells() { +static DeckPtr createDeckWithWells() { Opm::Parser parser; std::string input = "START -- 0 \n" @@ -70,7 +70,7 @@ DeckPtr createDeckWithWells() { } -DeckPtr createDeckWithWellsOrdered() { +static DeckPtr createDeckWithWellsOrdered() { Opm::Parser parser; std::string input = "START -- 0 \n" diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp index 0c987f792..39bcd87c1 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellSetTests.cpp @@ -30,7 +30,7 @@ #include -Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { +static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); for (size_t i = 0; i < numDays; i++) diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp index e127d042a..1c619a0de 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp @@ -33,7 +33,7 @@ #include #include -Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { +static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { boost::gregorian::date startDate( 2010 , boost::gregorian::Jan , 1); Opm::TimeMapPtr timeMap(new Opm::TimeMap(boost::posix_time::ptime(startDate))); for (size_t i = 0; i < numDays; i++) diff --git a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp index 4c557f912..7db6e0a70 100644 --- a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp +++ b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp @@ -36,7 +36,7 @@ using namespace Opm; -DeckPtr createDeck() { +static DeckPtr createDeck() { const char *deckData = "RUNSPEC\n" "\n" diff --git a/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp b/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp index 0fa331f16..a1685df94 100644 --- a/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp +++ b/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp @@ -35,7 +35,7 @@ using namespace Opm; using namespace boost::filesystem; -void +static void createDeckWithInclude(path& datafile, std::string addEndKeyword) { path root = unique_path("/tmp/%%%%-%%%%"); diff --git a/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp b/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp index faefa96dc..d38c6dd5b 100644 --- a/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp +++ b/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp @@ -32,7 +32,7 @@ using namespace Opm; -ParserPtr createWWCTParser() { +static ParserPtr createWWCTParser() { ParserKeywordPtr parserKeyword(new ParserKeyword("WWCT")); { ParserRecordPtr wwctRecord = parserKeyword->getRecord(); @@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_dataIsCorrect) { BOOST_CHECK_EQUAL("WELL-2", deck->getKeyword("WWCT" , 0)->getRecord(0)->getItem(0)->getString(1)); } -ParserPtr createBPRParser() { +static ParserPtr createBPRParser() { ParserKeywordPtr parserKeyword(new ParserKeyword("BPR")); { ParserRecordPtr bprRecord = parserKeyword->getRecord(); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp b/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp index 39683b3c6..ecc4353ce 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp @@ -61,7 +61,7 @@ PVTG\n\ /\n"; -void check_parser(ParserPtr parser) { +static void check_parser(ParserPtr parser) { DeckPtr deck = parser->parseString(pvtgData); DeckKeywordConstPtr kw1 = deck->getKeyword("PVTG" , 0); BOOST_CHECK_EQUAL(5U , kw1->size()); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp b/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp index 1a35e76be..67490c26c 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp @@ -61,7 +61,7 @@ PVTO\n\ /\n"; -void check_parser(ParserPtr parser) { +static void check_parser(ParserPtr parser) { DeckPtr deck = parser->parseString(pvtoData); DeckKeywordConstPtr kw1 = deck->getKeyword("PVTO" , 0); BOOST_CHECK_EQUAL(5U , kw1->size()); diff --git a/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp b/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp index 326a62fff..15c0bd06e 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp @@ -34,7 +34,7 @@ const char *parserData = " 0.9 0.5 0.1 8.0\n" " 1.0 1.0 0.1 9.0 /\n"; -void check_parser(ParserPtr parser) { +static void check_parser(ParserPtr parser) { DeckPtr deck = parser->parseString(parserData); DeckKeywordConstPtr kw1 = deck->getKeyword("SGOF"); BOOST_CHECK_EQUAL(1U , kw1->size()); @@ -46,7 +46,7 @@ void check_parser(ParserPtr parser) { BOOST_CHECK_EQUAL(10U * 4, item0->size()); } -void check_SgofTable(ParserPtr parser) { +static void check_SgofTable(ParserPtr parser) { DeckPtr deck = parser->parseString(parserData); Opm::SgofTable sgofTable(deck->getKeyword("SGOF")); diff --git a/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp b/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp index 82c9c6f0b..a07ade506 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp @@ -54,7 +54,7 @@ const char *parserData = " 0.9 0.5 0.1 8.0\n" " 1.0 1.0 0.1 9.0 /\n"; -void check_parser(ParserPtr parser) { +static void check_parser(ParserPtr parser) { DeckPtr deck = parser->parseString(parserData); DeckKeywordConstPtr kw1 = deck->getKeyword("SWOF"); BOOST_CHECK_EQUAL(1U , kw1->size()); @@ -66,7 +66,7 @@ void check_parser(ParserPtr parser) { BOOST_CHECK_EQUAL(10U * 4, item0->size()); } -void check_SwofTable(ParserPtr parser) { +static void check_SwofTable(ParserPtr parser) { DeckPtr deck = parser->parseString(parserData); Opm::SwofTable swofTable(deck->getKeyword("SWOF")); diff --git a/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp b/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp index 320cb6133..c6c9b5fe9 100644 --- a/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp +++ b/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp @@ -27,7 +27,7 @@ typedef std::map > -void createHeader(std::iostream& of ) { +static void createHeader(std::iostream& of ) { of << "#include " << std::endl; of << "#include " << std::endl; of << "#include " << std::endl; @@ -40,7 +40,7 @@ void createHeader(std::iostream& of ) { -void createTestHeader(std::iostream& of , const std::string& test_module) { +static void createTestHeader(std::iostream& of , const std::string& test_module) { of << "#define BOOST_TEST_MODULE " << test_module << std::endl; of << "#include " << std::endl; of << "#include " << std::endl; @@ -58,18 +58,18 @@ void createTestHeader(std::iostream& of , const std::string& test_module) { -void startFunction(std::iostream& of) { +static void startFunction(std::iostream& of) { of << "void Parser::addDefaultKeywords() { " << std::endl; } -void endFunction(std::iostream& of) { +static void endFunction(std::iostream& of) { of << "}" << std::endl; } -bool areStreamsEqual( std::istream& lhs, std::istream& rhs ) +static bool areStreamsEqual( std::istream& lhs, std::istream& rhs ) { for (;;) { @@ -84,7 +84,7 @@ bool areStreamsEqual( std::istream& lhs, std::istream& rhs ) } -void generateKeywordSignature(std::iostream& of , KeywordMapType& keywordMap) +static void generateKeywordSignature(std::iostream& of , KeywordMapType& keywordMap) { for (auto iter=keywordMap.begin(); iter != keywordMap.end(); ++iter) { KeywordElementType keywordElement = *iter; @@ -100,16 +100,16 @@ void generateKeywordSignature(std::iostream& of , KeywordMapType& keywordMap) //----------------------------------------------------------------- -void startTest(std::iostream& of, const std::string& test_name) { +static void startTest(std::iostream& of, const std::string& test_name) { of << "BOOST_AUTO_TEST_CASE(" << test_name << ") {" << std::endl; } -void endTest(std::iostream& of) { +static void endTest(std::iostream& of) { of << "}" << std::endl << std::endl; } -void testKeyword(ParserKeywordConstPtr parserKeyword , const std::string& keywordName , const boost::filesystem::path& jsonFile , std::iostream& of) { +static void testKeyword(ParserKeywordConstPtr parserKeyword , const std::string& keywordName , const boost::filesystem::path& jsonFile , std::iostream& of) { startTest(of , keywordName); of << "Json::JsonObject jsonKeyword(boost::filesystem::path(" << jsonFile << "));" << std::endl; of << "ParserKeywordConstPtr parserKeyword(new ParserKeyword(jsonKeyword));" << std::endl; @@ -135,7 +135,7 @@ void testKeyword(ParserKeywordConstPtr parserKeyword , const std::string& keywor } -void generateTestForKeyword(std::iostream& of, KeywordElementType keywordElement) { +static void generateTestForKeyword(std::iostream& of, KeywordElementType keywordElement) { const std::string& fileName = keywordElement.first; const std::string& keywordName = keywordElement.second.first; ParserKeywordConstPtr parserKeyword = keywordElement.second.second; @@ -144,7 +144,7 @@ void generateTestForKeyword(std::iostream& of, KeywordElementType keywordElement } -void generateKeywordTest(const char * test_file_name , KeywordMapType& keywordMap) { +static void generateKeywordTest(const char * test_file_name , KeywordMapType& keywordMap) { std::fstream test_file_stream( test_file_name , std::fstream::out ); createTestHeader( test_file_stream , "TEST_KEYWORDS"); for (auto iter=keywordMap.begin(); iter != keywordMap.end(); ++iter) @@ -155,7 +155,7 @@ void generateKeywordTest(const char * test_file_name , KeywordMapType& keywordMa //----------------------------------------------------------------- -void generateSourceForKeyword(std::iostream& of, KeywordElementType keywordElement) +static void generateSourceForKeyword(std::iostream& of, KeywordElementType keywordElement) { const std::string& keywordName = keywordElement.second.first; ParserKeywordConstPtr parserKeyword = keywordElement.second.second; @@ -170,7 +170,7 @@ void generateSourceForKeyword(std::iostream& of, KeywordElementType keywordEleme std::cout << "Creating keyword: " << keywordName << std::endl; } -void generateKeywordSource(const char * source_file_name , KeywordMapType& keywordMap) { +static void generateKeywordSource(const char * source_file_name , KeywordMapType& keywordMap) { std::fstream source_file_stream( source_file_name, std::fstream::out ); createHeader(source_file_stream); @@ -186,7 +186,7 @@ void generateKeywordSource(const char * source_file_name , KeywordMapType& keywo //----------------------------------------------------------------- -void scanKeyword(const boost::filesystem::path& file , KeywordMapType& keywordMap) { +static void scanKeyword(const boost::filesystem::path& file , KeywordMapType& keywordMap) { if (ParserKeyword::validName(file.filename().string())) { Json::JsonObject * jsonKeyword; @@ -209,7 +209,7 @@ void scanKeyword(const boost::filesystem::path& file , KeywordMapType& keywordMa } } -void scanAllKeywords(const boost::filesystem::path& directory , KeywordMapType& keywordMap) { +static void scanAllKeywords(const boost::filesystem::path& directory , KeywordMapType& keywordMap) { boost::filesystem::directory_iterator end; for (boost::filesystem::directory_iterator iter(directory); iter != end; iter++) { if (boost::filesystem::is_directory(*iter)) @@ -222,7 +222,7 @@ void scanAllKeywords(const boost::filesystem::path& directory , KeywordMapType& //----------------------------------------------------------------- -void printUsage() { +static void printUsage() { std::cout << "Generates source code for populating the parser's list of known keywords." << std::endl; std::cout << "Usage: createDefaultKeywordList []" << std::endl; std::cout << " : Path to keyword (JSON) files" << std::endl; @@ -233,7 +233,7 @@ void printUsage() { } -void ensurePath( const char * file_name ) { +static void ensurePath( const char * file_name ) { boost::filesystem::path file(file_name); if (!boost::filesystem::is_directory( file.parent_path())) boost::filesystem::create_directory( file.parent_path()); diff --git a/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp b/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp index f8980bd24..67b8964ce 100644 --- a/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(addItem_SameName_Throw) { BOOST_CHECK_THROW(record->addItem(itemInt2), std::invalid_argument); } -ParserRecordPtr createSimpleParserRecord() { +static ParserRecordPtr createSimpleParserRecord() { ParserItemSizeEnum sizeType = SINGLE; ParserIntItemPtr itemInt1(new ParserIntItem("ITEM1", sizeType)); ParserIntItemPtr itemInt2(new ParserIntItem("ITEM2", sizeType)); @@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE(parse_validRecord_deckRecordCreated) { // INT INT DOUBLE DOUBLE INT DOUBLE -ParserRecordPtr createMixedParserRecord() { +static ParserRecordPtr createMixedParserRecord() { ParserItemSizeEnum sizeType = SINGLE; ParserIntItemPtr itemInt1(new ParserIntItem("INTITEM1", sizeType)); diff --git a/opm/parser/eclipse/Parser/tests/ParserTests.cpp b/opm/parser/eclipse/Parser/tests/ParserTests.cpp index 0d6282137..9c6d8f1e6 100644 --- a/opm/parser/eclipse/Parser/tests/ParserTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserTests.cpp @@ -277,7 +277,7 @@ BOOST_AUTO_TEST_CASE(WildCardTest) { /***************** Simple Int parsing ********************************/ -ParserKeywordPtr setupParserKeywordInt(std::string name, int numberOfItems) { +static ParserKeywordPtr __attribute__((unused)) setupParserKeywordInt(std::string name, int numberOfItems) { ParserKeywordPtr parserKeyword(new ParserKeyword(name)); ParserRecordPtr parserRecord = parserKeyword->getRecord(); diff --git a/opm/parser/eclipse/Parser/tests/createInlineItemTest.cpp b/opm/parser/eclipse/Parser/tests/createInlineItemTest.cpp index c16909b6a..588698143 100644 --- a/opm/parser/eclipse/Parser/tests/createInlineItemTest.cpp +++ b/opm/parser/eclipse/Parser/tests/createInlineItemTest.cpp @@ -11,7 +11,7 @@ using namespace Opm; -void createHeader(std::ofstream& of , const std::string& test_module) { +static void createHeader(std::ofstream& of , const std::string& test_module) { of << "#define BOOST_TEST_MODULE " << test_module << std::endl; of << "#include " << std::endl; of << "#include " << std::endl; @@ -23,17 +23,17 @@ void createHeader(std::ofstream& of , const std::string& test_module) { } -void startTest(std::ofstream& of, const std::string& test_name) { +static void startTest(std::ofstream& of, const std::string& test_name) { of << "BOOST_AUTO_TEST_CASE(" << test_name << ") {" << std::endl; } -void endTest(std::ofstream& of) { +static void endTest(std::ofstream& of) { of << "}" << std::endl << std::endl; } - void intItem(std::ofstream& of) { +static void intItem(std::ofstream& of) { startTest(of , "IntItem"); of << " ParserIntItem * item = new ParserIntItem(\"NAME\" , SINGLE);" << std::endl; of << " ParserIntItem * inlineItem = "; @@ -48,7 +48,7 @@ void endTest(std::ofstream& of) { } - void intItemWithDefault(std::ofstream& of) { +static void intItemWithDefault(std::ofstream& of) { startTest(of , "IntItemWithDefault"); of << " ParserIntItem * item = new ParserIntItem(\"NAME\" , SINGLE , 100);" << std::endl; of << " ParserIntItem * inlineItem = "; @@ -66,7 +66,7 @@ void endTest(std::ofstream& of) { /*****************************************************************/ - void DoubleItem(std::ofstream& of) { +static void DoubleItem(std::ofstream& of) { startTest(of , "DoubleItem"); of << " ParserDoubleItem * item = new ParserDoubleItem(\"NAME\" , ALL);" << std::endl; of << " ParserDoubleItem * inlineItem = "; @@ -81,7 +81,7 @@ void endTest(std::ofstream& of) { } - void DoubleItemWithDefault(std::ofstream& of) { +static void DoubleItemWithDefault(std::ofstream& of) { startTest(of , "DoubleItemWithDefault"); of << " ParserDoubleItem * item = new ParserDoubleItem(\"NAME\" , SINGLE , 100.89);" << std::endl; of << " ParserDoubleItem * inlineItem = "; @@ -98,7 +98,7 @@ void endTest(std::ofstream& of) { /*****************************************************************/ - void FloatItem(std::ofstream& of) { +static void FloatItem(std::ofstream& of) { startTest(of , "FloatItem"); of << " ParserFloatItem * item = new ParserFloatItem(\"NAME\" , ALL);" << std::endl; of << " ParserFloatItem * inlineItem = "; @@ -113,7 +113,7 @@ void endTest(std::ofstream& of) { } - void FloatItemWithDefault(std::ofstream& of) { +static void FloatItemWithDefault(std::ofstream& of) { startTest(of , "FloatItemWithDefault"); of << " ParserFloatItem * item = new ParserFloatItem(\"NAME\" , SINGLE , 100.89);" << std::endl; of << " ParserFloatItem * inlineItem = "; @@ -129,7 +129,7 @@ void endTest(std::ofstream& of) { /*****************************************************************/ - void stringItem(std::ofstream& of) { +static void stringItem(std::ofstream& of) { startTest(of , "StringItem"); of << " ParserStringItem * item = new ParserStringItem(\"NAME\" , SINGLE);" << std::endl; of << " ParserStringItem * inlineItem = "; @@ -144,7 +144,7 @@ void endTest(std::ofstream& of) { } - void stringItemWithDefault(std::ofstream& of) { +static void stringItemWithDefault(std::ofstream& of) { startTest(of , "StringItemWithDefault"); of << " ParserStringItem * item = new ParserStringItem(\"NAME\" , ALL , \"100\");" << std::endl; of << " ParserStringItem * inlineItem = "; diff --git a/opm/parser/eclipse/Units/tests/UnitTests.cpp b/opm/parser/eclipse/Units/tests/UnitTests.cpp index b7ab756c6..aeb691650 100644 --- a/opm/parser/eclipse/Units/tests/UnitTests.cpp +++ b/opm/parser/eclipse/Units/tests/UnitTests.cpp @@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(UnitSystemParseInvalidThrows) { -void checkSystemHasRequiredDimensions(std::shared_ptr system) { +static void checkSystemHasRequiredDimensions(std::shared_ptr system) { BOOST_CHECK( system->hasDimension("1")); BOOST_CHECK( system->hasDimension("Length")); BOOST_CHECK( system->hasDimension("Mass"));