| Summary: | Fix emulators/open-vm-tools(-nox11) build with clang 3.5.0 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Dimitry Andric <dim> | ||||
| Component: | Individual Port(s) | Assignee: | Steve Wills <swills> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Many People | CC: | kwm | ||||
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(swills) |
||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 195480 | ||||||
| Attachments: |
|
||||||
Auto-assigned to maintainer swills@FreeBSD.org A commit references this bug: Author: kwm Date: Sat Feb 14 13:36:49 UTC 2015 New revision: 378961 URL: https://svnweb.freebsd.org/changeset/ports/378961 Log: Fix build with clang 3.5.0. PR: 196108 Submitted by: dim@ Approved by: maintainer (via IRC) Changes: head/emulators/open-vm-tools/files/patch-toolbox__toolboxcmd-shrink.c |
Created attachment 150735 [details] Fix emulators/open-vm-tools(-nox11) build with clang 3.5.0 The emulators/open-vm-tools and its -nox11 variant ports fail to compile with clang 3.5.0, due to the following -Werror warning: toolboxcmd-shrink.c:394:31: error: comparison of constant 'WIPER_ENABLED' (2) with boolean expression is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (!ShrinkGetWiperState() == WIPER_ENABLED && !Wiper_IsWipeSupported(part)) { ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ 1 error generated. This is a logic error in the code, the ! operator applies to the left hand part of the == expression, while WIPER_ENABLED is one of three possible enum values. The code should use "ShrinkGetWiperState() != WIPER_ENABLED" instead.