From 3faaad733554bc08ac479ca737abecdf1d9dd45a Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan.bastani@ens.fr> Date: Fri, 17 Dec 2010 12:15:34 +0100 Subject: [PATCH] parallel: removed warning and clarified error message --- preprocessor/ConfigFile.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/preprocessor/ConfigFile.cc b/preprocessor/ConfigFile.cc index c94983962c..15e1b2adbe 100644 --- a/preprocessor/ConfigFile.cc +++ b/preprocessor/ConfigFile.cc @@ -73,26 +73,26 @@ ConfigFile::getConfigFileInfo(const string ¶llel_config_file) { // Test OS and try to open default file #if defined(_WIN32) || defined(__CYGWIN32__) - string defaultConfigFile (getenv("APPDATA")); - if (&defaultConfigFile==NULL) + if (getenv("APPDATA")==NULL) { cerr << "ERROR: APPDATA environment variable not found." << endl; exit(EXIT_FAILURE); } + string defaultConfigFile (getenv("APPDATA")); defaultConfigFile += "\\dynare.ini"; #else - string defaultConfigFile (getenv("HOME")); - if (&defaultConfigFile==NULL) + if (getenv("HOME")==NULL) { cerr << "ERROR: HOME environment variable not found." << endl; exit(EXIT_FAILURE); } + string defaultConfigFile (getenv("HOME")); defaultConfigFile += "/.dynare"; #endif configFile = new ifstream(defaultConfigFile.c_str(), fstream::in); if (!configFile->is_open()) { - cerr << "ERROR: Could not open the default config file" << endl; + cerr << "ERROR: Could not open the default config file (" << defaultConfigFile << ")" << endl; exit(EXIT_FAILURE); } } -- GitLab