Bug 208490 - audio/taglookup: Fix build with libc++ 3.8.0
Summary: audio/taglookup: 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: Thomas Zander
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-03 19:50 UTC by Dimitry Andric
Modified: 2016-04-24 14:00 UTC (History)
2 users (show)

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


Attachments
Fix type for abs() calls in audio/taglookup (712 bytes, patch)
2016-04-03 19:50 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-03 19:50:23 UTC
Created attachment 168940 [details]
Fix type for abs() calls in audio/taglookup

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

tag.cpp:170:17: error: call to 'abs' is ambiguous
            if( abs(f1.second - x_) <
                ^~~

This is because f1.second and x_ are unsigned values, and it is therefore ambiguous to which type the expression should be casted before calling abs().  A similar ambiguity exists in the next line.  Fix these by explicity casting the expression result to a signed type before calling abs().

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/taglookup-0.2_3.log
Comment 1 Thomas Zander freebsd_committer freebsd_triage 2016-04-24 13:48:41 UTC
maintainer timeout
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-24 13:55:18 UTC
A commit references this bug:

Author: riggs
Date: Sun Apr 24 13:54:49 UTC 2016
New revision: 413942
URL: https://svnweb.freebsd.org/changeset/ports/413942

Log:
  Fix build with libc++ 3.8.0

  PR:		208490
  Submitted by:	dim
  Approved by:	maintainer timeout
  MFH:		2016Q2 (build fix blanket)

Changes:
  head/audio/taglookup/files/patch-tag.cpp
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-04-24 13:58:20 UTC
A commit references this bug:

Author: riggs
Date: Sun Apr 24 13:57:22 UTC 2016
New revision: 413943
URL: https://svnweb.freebsd.org/changeset/ports/413943

Log:
  MFH: r413942

  Fix build with libc++ 3.8.0

  PR:		208490
  Submitted by:	dim
  Approved by:	ports-secteam (build fix blanket), maintainer timeout

Changes:
_U  branches/2016Q2/
  branches/2016Q2/audio/taglookup/files/patch-tag.cpp