Bug 209108 - x11/fbdesk: Fix build with libc++ 3.8.0
Summary: x11/fbdesk: 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-04-27 18:01 UTC by Dimitry Andric
Modified: 2016-04-30 04:40 UTC (History)
1 user (show)

See Also:

Fix type for abs() call in x11/fbdesk (1.08 KB, patch)
2016-04-27 18:03 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-04-27 18:01:36 UTC

Comment 1 Dimitry Andric freebsd_committer 2016-04-27 18:03:08 UTC
Created attachment 169765 [details]
Fix type for abs() call in x11/fbdesk

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

TextBox.cc:202:19: error: call to 'abs' is ambiguous
            tmp = abs(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos));

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/fbdesk-1.4.1_6.log
Comment 2 commit-hook freebsd_committer 2016-04-30 04:40:03 UTC
A commit references this bug:

Author: pi
Date: Sat Apr 30 04:39:51 UTC 2016
New revision: 414329
URL: https://svnweb.freebsd.org/changeset/ports/414329

  x11/fbdesk: Fix build with libc++ 3.8.0

  PR:		209108
  Submitted by:	dim

Comment 3 Kurt Jaeger freebsd_committer 2016-04-30 04:40:10 UTC
Committed, thanks!