Bug 197857 - Fix www/libxul build with clang 3.6.0
Summary: Fix www/libxul build with clang 3.6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks: 197395
  Show dependency treegraph
 
Reported: 2015-02-20 20:15 UTC by Dimitry Andric
Modified: 2015-02-21 08:23 UTC (History)
0 users

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


Attachments
Fix invalid conversions of nullptr to bool in libxul (6.96 KB, patch)
2015-02-20 20:15 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 freebsd_triage 2015-02-20 20:15:15 UTC
Created attachment 153233 [details]
Fix invalid conversions of nullptr to bool in libxul

During the exp-run in bug 197395, it was found that www/libxul gives errors with clang 3.6.0:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-11_23h04m51s/logs/errors/libxul-31.4.0_2.log

These errors are all -Werror warnings, of the form:

/wrkdirs/usr/ports/www/libxul/work/mozilla-esr31/js/src/builtin/TypedObject.cpp:713:16: error: implicit conversion of nullptr constant to 'bool' [-Werror,-Wnull-conversion]
        return nullptr;
        ~~~~~~ ^~~~~~~
               false

where the function is supposed to return bool, not a pointer.  These are bugs in the libxul code.

The attached patch fixes all the instances of those bugs.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-20 20:15:15 UTC
Auto-assigned to maintainer gecko@FreeBSD.org
Comment 2 Jan Beich freebsd_committer freebsd_triage 2015-02-21 05:58:13 UTC
Upstream also fixed in
- js/xpconnect/wrappers/XrayWrapper.cpp
- netwerk/ipc/NeckoParent.cpp

I may need to check comm-esr31 code (as in mail/thunderbird) doesn't have more.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-02-21 08:22:40 UTC
A commit references this bug:

Author: jbeich
Date: Sat Feb 21 08:22:29 UTC 2015
New revision: 379485
URL: https://svnweb.freebsd.org/changeset/ports/379485

Log:
  Fix invalid conversions of nullptr to bool to unbreak clang 3.6 build

  PR:		197857
  Submitted by:	dim (initial version)
  Obtained from:	https://github.com/mozilla/gecko-dev/commit/dd19f59

Changes:
  head/mail/thunderbird/files/patch-bug1021171
  head/www/firefox-esr/files/patch-bug1021171
  head/www/libxul/files/patch-bug1021171
Comment 4 Jan Beich freebsd_committer freebsd_triage 2015-02-21 08:23:55 UTC
Thanks. Committed.