]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Tools: prepare for gcc upgrade
authorVMware, Inc <>
Wed, 18 Sep 2013 03:19:40 +0000 (20:19 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Sep 2013 05:06:56 +0000 (22:06 -0700)
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 <dtor@vmware.com>
open-vm-tools/lib/slashProc/net.c
open-vm-tools/services/plugins/dndcp/copyPasteDnDX11.cpp

index f0dbaa174c2b3a6548e76aca1119b9f88cdad52a..7b4fcd4e45ebfb1c3633fbe7b2dcdf0babc4a9d0 100644 (file)
@@ -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;
index b5ab529031283edc42c8baf26f860abc92ae7a5a..7096e7ab79a14ffc99e9f258e9e268f784740ed1 100644 (file)
@@ -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) {