From: VMware, Inc <> Date: Wed, 18 Sep 2013 03:19:40 +0000 (-0700) Subject: Tools: prepare for gcc upgrade X-Git-Tag: 2013.09.16-1328054~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed57ff3cc7d3725cd6ef6ba482608108faa587c6;p=thirdparty%2Fopen-vm-tools.git Tools: prepare for gcc upgrade Had a few spare cycles, so tried compiling Tools with gcc-4.4.3. This change fixes all compilation errors. (It does NOT do the compiler upgrade, hence the minimal testing.) All changes are mechanical / should be correct at compile-time. appUtilFileTypes.h: hash_map was never a standard, use the standardized (std::tr1) unordered_map. Which removes ifdefs too. most other files: character strings are "const" in C++. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/slashProc/net.c b/open-vm-tools/lib/slashProc/net.c index f0dbaa174..7b4fcd4e4 100644 --- a/open-vm-tools/lib/slashProc/net.c +++ b/open-vm-tools/lib/slashProc/net.c @@ -217,8 +217,8 @@ SlashProcNet_GetSnmp(void) { GHashTable *myHashTable = NULL; GIOChannel *myChannel = NULL; - GIOStatus keyIoStatus; - GIOStatus valIoStatus; + GIOStatus keyIoStatus = G_IO_STATUS_ERROR; + GIOStatus valIoStatus = G_IO_STATUS_ERROR; gchar *myKeyLine = NULL; gchar *myValLine = NULL; Bool parseError = FALSE; diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp index b5ab52903..7096e7ab7 100644 --- a/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp +++ b/open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp @@ -220,7 +220,7 @@ CopyPasteDnDX11::Init(ToolsAppCtx *ctx) ASSERT(ctx); int argc = 1; - char *argv[] = {"", NULL}; + const char *argv[] = {"", NULL}; m_main = new Gtk::Main(&argc, (char ***) &argv, false); if (wrapper) {