Bug 208757 - games/edge: Fix build with libc++ 3.8.0
Summary: games/edge: Fix build with libc++ 3.8.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: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-12 20:12 UTC by Dimitry Andric
Modified: 2016-04-18 05:29 UTC (History)
1 user (show)

See Also:


Attachments
Replace abs() on unsigned arguments in games/edge (1.55 KB, patch)
2016-04-12 20:12 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-12 20:12:10 UTC
Created attachment 169260 [details]
Replace abs() on unsigned arguments in games/edge

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

epi/image_hq2x.cc:178:13: error: call to 'abs' is ambiguous
                   (u32_t)abs((YUV1 & Ymask) - (YUV2 & Ymask)) > trY ||
                          ^~~

This is because abs() is being called with unsigned arguments.  Fix this by calculating the unsigned difference in a more portable way.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/edge-1.35_6.log
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2016-04-18 05:28:50 UTC
committed, thanks.
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-18 05:29:39 UTC
A commit references this bug:

Author: pi
Date: Mon Apr 18 05:28:36 UTC 2016
New revision: 413549
URL: https://svnweb.freebsd.org/changeset/ports/413549

Log:
  games/edge: Fix build with libc++ 3.8.0

  - Replace abs() on unsigned arguments in games/edge

  PR:		208757
  Submitted by:	dim

Changes:
  head/games/edge/files/patch-epi__image_hq2x.cc