Bug 209333 - audio/calf: Fix build with libc++ 3.8.0
Summary: audio/calf: 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
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-05-06 15:59 UTC by Dimitry Andric
Modified: 2016-05-06 19:26 UTC (History)
1 user (show)

See Also:

Fix argument types for std::min() and std::max() in audio/calf (4.52 KB, patch)
2016-05-06 15:59 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 2016-05-06 15:59:16 UTC
Created attachment 170051 [details]
Fix argument types for std::min() and std::max() in audio/calf

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

analyzer.cpp:473:59: error: no matching function for call to 'max'
                                fft_outL[_iter] = 0.25f * std::max(n * 0.6f * \

This is because in several places, std::min() and std::max() are called with mismatched arguments, e.g. float and double, or vice versa.  Fix this by changing most instances to use fabsf() and explicit float types.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/calf-0.0.60_1.log
Comment 1 Kurt Jaeger freebsd_committer 2016-05-06 19:25:59 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer 2016-05-06 19:26:23 UTC
A commit references this bug:

Author: pi
Date: Fri May  6 19:25:49 UTC 2016
New revision: 414721
URL: https://svnweb.freebsd.org/changeset/ports/414721

  audio/calf: Fix build with libc++ 3.8.0

  - change some patches to conform to makepatch rules

  PR:		209333
  Submitted by:	dim