code consistency and hints for static analysis
authorRobin Gareus <robin@gareus.org>
Wed, 19 Aug 2015 02:07:39 +0000 (04:07 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 19 Aug 2015 02:07:39 +0000 (04:07 +0200)
libs/ardour/filesystem_paths.cc
libs/ardour/system_exec.cc

index 7e9b4e18577f263e1b9b7c11400834fc3cee0863..2c378c0d7ffd76a49077d2e49188ce3434b3dd92 100644 (file)
@@ -124,7 +124,7 @@ user_config_directory (int version)
                        } else if (!Glib::file_test (p, Glib::FILE_TEST_IS_DIR)) {
                        error << string_compose (_("Configuration directory %1 already exists and is not a directory/folder - cannot run"),
                                                 p) << endmsg;
-                       exit (1);
+                       abort(); /*NOTREACHED*/
                }
        }
 
@@ -190,7 +190,7 @@ user_cache_directory ()
        } else if (!Glib::file_test (p, Glib::FILE_TEST_IS_DIR)) {
                fatal << string_compose (_("Cache directory %1 already exists and is not a directory/folder - cannot run"),
                                           p) << endmsg;
-               exit (1);
+               abort(); /*NOTREACHED*/
        }
 
        return p;
@@ -231,7 +231,7 @@ windows_package_directory_path ()
        if (package_dir == NULL) {
                fatal << string_compose (_("Cannot determine %1 package directory"),
                                           PROGRAM_NAME) << endmsg;
-               // not reached
+               abort(); /*NOTREACHED*/
        }
 
        std::string package_dir_path(package_dir);
index d83165252a913da4b08af75e47e788af0e37e226..b85b2347aebb76d9e8001f1a76d4914bc0dbb195 100644 (file)
@@ -41,8 +41,7 @@ static char *vfork_exec_wrapper_path() {
                                        ),
                                "ardour-exec-wrapper", vfork_exec_wrapper)) {
                PBD::fatal << "vfork exec wrapper 'ardour-exec-wrapper' was not found in $PATH." << endmsg;
-               /* not reached */
-               return NULL;
+               abort(); /*NOTREACHED*/
        }
        return strdup(vfork_exec_wrapper.c_str());
 #endif