From 2c6032d26eb8fb488349748e3fe405df5ec11f02 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 28 Jan 2014 02:38:03 -0800 Subject: [PATCH] VBOX: Fix compiler error and compiler warning on Mac --- samples/vboxwrapper/vbox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index a007d003b2..a3242b1b90 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -2385,7 +2385,6 @@ int VBOX_VM::launch_vboxsvc() { // Launch the VM. int VBOX_VM::launch_vboxvm() { char buf[256]; - char error_msg[256]; char cmdline[1024]; char* argv[5]; int argc; @@ -2418,6 +2417,7 @@ int VBOX_VM::launch_vboxvm() { } #ifdef _WIN32 + char error_msg[256]; STARTUPINFO si; PROCESS_INFORMATION pi; SECURITY_ATTRIBUTES sa; @@ -2558,7 +2558,8 @@ CLEANUP: } #endif - vbm_trace(std::string(cmdline), output, retval); + string cmd_line = cmdline; + vbm_trace(cmd_line, output, retval); return retval; }