Bug 208841 - games/el: Fix build with libc++ 3.8.0
Summary: games/el: 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-16 20:11 UTC by Dimitry Andric
Modified: 2016-04-29 21:55 UTC (History)
1 user (show)

See Also:
pi: maintainer-feedback-

Fix type for abs() calls in games/el (2.90 KB, patch)
2016-04-16 20:11 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-16 20:11:17 UTC
Created attachment 169378 [details]
Fix type for abs() calls in games/el

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

icon_window.cpp:361:8: error: call to 'abs' is ambiguous
                        if (abs(SDL_GetTicks() - last_flash_change) > 250)

This is because abs() is being called with unsigned arguments.  Fix this in a few places by casting the argument to the appropriate signed type.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/el-193_5.log
Comment 1 Kurt Jaeger freebsd_committer 2016-04-29 21:55:13 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer 2016-04-29 21:55:53 UTC
A commit references this bug:

Author: pi
Date: Fri Apr 29 21:55:11 UTC 2016
New revision: 414296
URL: https://svnweb.freebsd.org/changeset/ports/414296

  games/el: Fix build with libc++ 3.8.0

  PR:		208841
  Submitted by:	dim
  Approved by:	acm (maintainer timeout)