Bug 196105 - Fix astro/gpxloggerd build with clang 3.5.0
Summary: Fix astro/gpxloggerd build with clang 3.5.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Gleb Smirnoff
Depends on:
Blocks: 195480
  Show dependency treegraph
Reported: 2014-12-18 20:16 UTC by Dimitry Andric
Modified: 2014-12-19 04:57 UTC (History)
1 user (show)

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

Fix astro/gpxloggerd build with clang 3.5.0 (927 bytes, patch)
2014-12-18 20:16 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 2014-12-18 20:16:25 UTC
Created attachment 150734 [details]
Fix astro/gpxloggerd build with clang 3.5.0

On arches with 64-bit time_t, astro/gpxloggerd will fail to compile with clang 3.5.0, due to the following -Werror warning:

gpxloggerd.c:199:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        if (abs(t - ot) < interval)
gpxloggerd.c:199:6: note: use function 'labs' instead
        if (abs(t - ot) < interval)

In this case, replacing the call with labs() is just fine.
Comment 1 Bugzilla Automation freebsd_committer 2014-12-18 20:16:25 UTC
Auto-assigned to maintainer glebius@FreeBSD.org
Comment 2 commit-hook freebsd_committer 2014-12-19 04:57:01 UTC
A commit references this bug:

Author: glebius
Date: Fri Dec 19 04:56:04 UTC 2014
New revision: 374939
URL: https://svnweb.freebsd.org/changeset/ports/374939

  Update to new version. Fixes build with clang.

  PR:		196105
  Submitted by:	dim