]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix error reported by clang 6.0.0 - comparison 'int' <= 4294967295 is always true
authorOliver Kurth <okurth@vmware.com>
Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 30 Jan 2018 00:52:19 +0000 (16:52 -0800)
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

open-vm-tools/AUTHORS
open-vm-tools/services/plugins/vix/vixTools.c

index de6a1eba3b3e12822b0eb7a2ae7bfb100f4457d0..a82f4a6ac4ef8d10e196cc2c2cbee549e57d9d6c 100644 (file)
@@ -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
index ada04183b28c71f56f344fbaa8f7099aa8f9589d..435b934addb34bbc54a212388199bdefa384d727 100644 (file)
@@ -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",