Bug 224816 - emulators/open-vm-tools: Fix build with clang 6.0.0
Summary: emulators/open-vm-tools: Fix build with clang 6.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Josh Paetzel
URL:
Keywords:
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-01-01 13:06 UTC by Dimitry Andric
Modified: 2018-01-22 20:27 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (jpaetzel)


Attachments
Fix tautological (endless) loop in vixTools.c (1.55 KB, patch)
2018-01-01 13:06 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2018-01-01 13:06:58 UTC
Created attachment 189312 [details]
Fix tautological (endless) loop in vixTools.c

While testing the new clang600-import branch (see bug 224669), I noticed that open-vm-tools fails to compile, due to a new warning in clang 6.0.0:

--- libvix_la-vixTools.lo ---
vixTools.c:7333:22: error: result of comparison 'int' <= 4294967295 is always true [-Werror,-Wtautological-constant-compare]
   for (var = 0; var <= 0xFFFFFFFF; var++) {
                 ~~~ ^  ~~~~~~~~~~
1 error generated.

Here is a patch to fix that particular error, and this also avoids an endless loop in practice.
Comment 1 Josh Paetzel freebsd_committer 2018-01-02 14:45:47 UTC
Committed, thanks.

I also submitted this fix upstream.

https://github.com/vmware/open-vm-tools/pull/221
Comment 2 commit-hook freebsd_committer 2018-01-02 14:45:50 UTC
A commit references this bug:

Author: jpaetzel
Date: Tue Jan  2 14:45:06 UTC 2018
New revision: 457864
URL: https://svnweb.freebsd.org/changeset/ports/457864

Log:
  Fix build with clang 6.0.0

  Also avoids an endless loop in practice

  PR:	224816
  Submitted by:	dim

Changes:
  head/emulators/open-vm-tools/Makefile
  head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c
Comment 3 Dimitry Andric freebsd_committer 2018-01-02 18:40:06 UTC
Josh, can you please MFH this to 2018Q1?
Comment 4 Josh Paetzel freebsd_committer 2018-01-02 18:49:25 UTC
Yes.
Comment 5 commit-hook freebsd_committer 2018-01-22 20:27:44 UTC
A commit references this bug:

Author: jpaetzel
Date: Mon Jan 22 20:27:01 UTC 2018
New revision: 459695
URL: https://svnweb.freebsd.org/changeset/ports/459695

Log:
  MFH: r457864

  Fix build with clang 6.0.0

  Also avoids an endless loop in practice

  PR:	224816
  Submitted by:	dim

  Approved by:	ports-secteam (swills)

Changes:
_U  branches/2018Q1/
  branches/2018Q1/emulators/open-vm-tools/Makefile
  branches/2018Q1/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c