Bug 209333

Summary: audio/calf: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Some People CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Fix argument types for std::min() and std::max() in audio/calf none

Description Dimitry Andric freebsd_committer freebsd_triage 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 freebsd_triage 2016-05-06 19:25:59 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 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

Log:
  audio/calf: Fix build with libc++ 3.8.0

  - change some patches to conform to makepatch rules

  PR:		209333
  Submitted by:	dim

Changes:
  head/audio/calf/files/patch-src__calf__audio_fx.h
  head/audio/calf/files/patch-src__calf__osctl.h
  head/audio/calf/files/patch-src_analyzer.cpp
  head/audio/calf/files/patch-src_modules__dist.cpp
  head/audio/calf/files/patch-src_modules__limit.cpp