Date: Wed, 03 Dec 2014 22:12:59 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 195657] New: Fix audio/liblo build with clang 3.5.0 Message-ID: <bug-195657-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195657 Bug ID: 195657 Summary: Fix audio/liblo build with clang 3.5.0 Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: dim@FreeBSD.org CC: koalative@gmail.com CC: koalative@gmail.com Flags: maintainer-feedback?(koalative@gmail.com) Created attachment 150155 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=150155&action=edit Fix audio/liblo build with clang 3.5.0 On 64-bit arches, audio/liblo will fail to compile with clang 3.5.0, due to the following -Werror warning: message.c:1000:17: 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] abs((char *) d - (char *) end), m); ^ On 64-bit arches, pointer differences are usually longs, but simply replacing the abs() call with labs() is also not a good solution, because then the code is incorrect for 32-bit arches. Fix this by using a ternary operator expression, which is type-safe. While here, fix the printf format conversion specifier for printing ptrdiff_t's. --- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> --- Maintainer CC'd -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-195657-13>