Bug 196105

Summary: Fix astro/gpxloggerd build with clang 3.5.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Gleb Smirnoff <glebius>
Status: Closed FIXED    
Severity: Affects Many People CC: emaste
Priority: --- Flags: bugzilla: maintainer-feedback? (glebius)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 195480    
Attachments:
Description Flags
Fix astro/gpxloggerd build with clang 3.5.0 none

Description Dimitry Andric freebsd_committer freebsd_triage 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)
            ^~~
            labs

In this case, replacing the call with labs() is just fine.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-12-18 20:16:25 UTC
Auto-assigned to maintainer glebius@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 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

Log:
  Update to new version. Fixes build with clang.

  PR:		196105
  Submitted by:	dim

Changes:
  head/astro/gpxloggerd/Makefile
  head/astro/gpxloggerd/distinfo