]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
vmtools: fix compiler errors in posix service discovery core plugin
authorOliver Kurth <okurth@vmware.com>
Wed, 1 Apr 2020 18:34:05 +0000 (11:34 -0700)
committerOliver Kurth <okurth@vmware.com>
Wed, 1 Apr 2020 18:34:05 +0000 (11:34 -0700)
As we build the vmtools for arm (unfortunately not on main), we hit
a compiler warnings "ISO C90 forbids mixed declarations and code"
in this new code.

open-vm-tools/services/plugins/serviceDiscovery/serviceDiscoveryPosix.c

index 741b913e64b2ef341944e1e400e69dccee1fba13..2476e163a8832ff277d2cffb90e44d87c857e460 100644 (file)
@@ -156,8 +156,8 @@ PublishScriptOutputToNamespaceDB(ToolsAppCtx *ctx,
       g_debug("%s: readBytes = %" G_GSSIZE_FORMAT "\n", __FUNCTION__, readBytes);
 
       if (readBytes > 0) {
-         stdoutIsEmpty = FALSE;
          gchar* msg = g_strdup_printf("%s-%d", key, ++i);
+         stdoutIsEmpty = FALSE;
          status = WriteData(ctx, msg, buf, readBytes);
          g_free(msg);
       }
@@ -200,4 +200,4 @@ out:
                 __FUNCTION__, errno);
    }
    return status;
-}
\ No newline at end of file
+}