try to fix various warnings from gcc when optimization flags are enabled
[ardour.git] / libs / ardour / globals.cc
index 459f6f0e518c179a2003808ba380e4a866d34165..2cd886b03ea9f95858f56da1eef6de3915b90b0b 100644 (file)
@@ -354,9 +354,15 @@ ARDOUR::init_post_engine ()
        ARDOUR::PluginManager::instance().refresh ();
 }
 
-int
-ARDOUR::cleanup ()
+void
+ARDOUR::cleanup () 
 {
+       if (!libardour_initialized) {
+               return;
+       }
+
+       ARDOUR::AudioEngine::destroy ();
+
        delete Library;
        lrdf_cleanup ();
        delete &ControlProtocolManager::instance();
@@ -368,7 +374,8 @@ ARDOUR::cleanup ()
        vstfx_exit();
 #endif
        PBD::cleanup ();
-       return 0;
+
+       return;
 }
 
 void
@@ -518,8 +525,8 @@ ARDOUR::set_translations_enabled (bool yn)
                c = '0';
        }
        
-       ::write (fd, &c, 1);
-       ::close (fd);
+       (void) ::write (fd, &c, 1);
+       (void) ::close (fd);
 
        return true;
 }