Bug 209017 - misc/bdelta: Fix build with libc++ 3.8.0
Summary: misc/bdelta: Fix build with libc++ 3.8.0
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Roman Bogorodskiy
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-24 19:39 UTC by Dimitry Andric
Modified: 2016-04-29 14:33 UTC (History)
0 users

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


Attachments
Fix type for abs() calls in misc/bdelta (1.27 KB, patch)
2016-04-24 19:39 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 2016-04-24 19:39:41 UTC
Created attachment 169640 [details]
Fix type for abs() calls in misc/bdelta

During the exp-run in bug 208158, it was found that misc/bdeltra gives errors with libc++ 3.8.0 [1]:

libbdelta.cpp:207:13: error: call to 'abs' is ambiguous
        if (abs(lastf1Place-h->hash_items[checkMatches[i]].loc) <
            ^~~

This is because abs() is being called with unsigned arguments.  Fix this by casting the arguments to the appropriate signed type.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/bdelta-0.1.0.log
Comment 1 Roman Bogorodskiy freebsd_committer freebsd_triage 2016-04-28 16:24:45 UTC
Hi Dimitry,

I think this patch is superseded by this update: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209063. At least I don't see a similar code in the newer version.
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2016-04-29 14:33:33 UTC
Yep, it's now building without that patch. Thanks.