From: Oliver Kurth Date: Wed, 1 Apr 2020 18:34:05 +0000 (-0700) Subject: vmtools: fix compiler errors in posix service discovery core plugin X-Git-Tag: stable-11.1.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab320617291769464b2cfb841dcdde6fc59e9156;p=thirdparty%2Fopen-vm-tools.git vmtools: fix compiler errors in posix service discovery core plugin 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. --- diff --git a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscoveryPosix.c b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscoveryPosix.c index 741b913e6..2476e163a 100644 --- a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscoveryPosix.c +++ b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscoveryPosix.c @@ -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 +}