Created attachment 150761 [details]
Fix lang/urweb build with clang 3.5.0
The lang/urweb port fails to compile with clang 3.5.0, due to the following -Werror warning:
urweb.c:4207:12: error: absolute value function 'abs' given an argument of type 'uw_Basis_int' (aka 'long long') but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
urweb.c:4207:12: note: use function 'llabs' instead
In this case the fix is to do as clang suggests: both the type of 'ret' and the return type of the function are 'long long', so llabs() should be used.
A long time ago I wrote a custom patch to get it working with clang, but I don't recall if I ever added to the port.
I'll look into getting clang working with all of my ports.
what about this patch though?
And more importantly, will supporting clang break it on gcc?
This patch is very minimal, let's just apply it. It should not break with any version of gcc.
Sorry about the delay. Yes, please apply the patch.
I am going to submit an update to a much newer version of Ur/Web very soon, and I will incorporate that patch into my submission if necessary.
I'll talk to the Ur/Web developers if there is anything that should be committed upstream.
My apologies to Dimitry, I misunderstood that he already provided a fix.
Sorry this took so long.
A commit references this bug:
Date: Sat Feb 14 13:58:07 UTC 2015
New revision: 378962
Fix the build with clang 3.5 by using the suggested function.
Submitted by: dim@
Approved by: maintainer
Assign to committer who resolved