Bug 216263 - emulators/open-vm-tools emulators/open-vm-tools-nox11: Fix build with clang 4.0.0
Summary: emulators/open-vm-tools emulators/open-vm-tools-nox11: Fix build with clang 4...
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: Steve Wills
URL:
Keywords: patch
: 216643 (view as bug list)
Depends on:
Blocks: 216008
  Show dependency treegraph
 
Reported: 2017-01-19 18:47 UTC by Dimitry Andric
Modified: 2017-03-24 18:58 UTC (History)
3 users (show)

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


Attachments
Disable -Waddress-of-packed-member for open-vm-tools (1.78 KB, patch)
2017-01-19 18:47 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 2017-01-19 18:47:58 UTC
Created attachment 179077 [details]
Disable -Waddress-of-packed-member for open-vm-tools

In bug 216008, we are testing clang 4.0.0 for ports, and open-vm-tools doesn't compile with it, due to its new -Waddress-of-packed-member warning:

hgfsServer.c:5709:50: error: taking address of packed member 'actualSize' of class or structure 'HgfsReplyReadV3' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
                                                &reply->actualSize);
                                                 ^~~~~~~~~~~~~~~~~
hgfsServer.c:5729:63: error: taking address of packed member 'actualSize' of class or structure 'HgfsReplyRead' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
                                             reply->payload, &reply->actualSize);
                                                              ^~~~~~~~~~~~~~~~~

We could fix this warning by patching the code, but I assume this will be executed on x86 only, so suppressing the warning is less hassle.  Here is a patch to do just that.
Comment 1 Dimitry Andric freebsd_committer 2017-02-04 21:15:59 UTC
*** Bug 216643 has been marked as a duplicate of this bug. ***
Comment 2 Steve Wills freebsd_committer 2017-03-24 18:58:12 UTC
Port is updated, should be fixed.