From: Oliver Kurth Date: Tue, 30 Jan 2018 00:52:19 +0000 (-0800) Subject: Fix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true X-Git-Tag: 10.2.5~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3046437d0990e875a653e4889f2bdbfd23bb50b6;p=thirdparty%2Fopen-vm-tools.git Fix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true This patch is a slightly modified version of the patch submitted by Josh Paetzel in pull request: https://github.com/vmware/open-vm-tools/pull/221 --- diff --git a/open-vm-tools/AUTHORS b/open-vm-tools/AUTHORS index de6a1eba3..a82f4a6ac 100644 --- a/open-vm-tools/AUTHORS +++ b/open-vm-tools/AUTHORS @@ -17,3 +17,5 @@ Sebastian Parschauer Add support to properly report SLES12-SAP Andrew Stormont Fix finding C++ compiler for cross-compiling - https://github.com/vmware/open-vm-tools/pull/206 +Josh Paetzel Fix compilation error in clang 6.0 + - https://github.com/vmware/open-vm-tools/pull/221 diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c index ada04183b..435b934ad 100644 --- a/open-vm-tools/services/plugins/vix/vixTools.c +++ b/open-vm-tools/services/plugins/vix/vixTools.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2007-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2007-2018 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -7330,7 +7330,7 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg, // IN goto abort; } } - for (var = 0; var <= 0xFFFFFFFF; var++) { + for (var = 0; var < MAX_INT32; var++) { free(tempScriptFilePath); tempScriptFilePath = Str_SafeAsprintf(NULL, "%s"DIRSEPS"%s%d%s",