Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-23 Thread Ganesh Ajjanagadde
On Sun, Aug 23, 2015 at 6:58 PM, Michael Niedermayer wrote: > On Sat, Aug 22, 2015 at 04:26:53PM +0200, Nicolas George wrote: >> Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : >> > +/* cast for -Wabsolute-value in clang 3.5+ */ >> > +return abs((int) (t1 - t2)) + abs((in

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-23 Thread Michael Niedermayer
On Sat, Aug 22, 2015 at 04:26:53PM +0200, Nicolas George wrote: > Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : > > +/* cast for -Wabsolute-value in clang 3.5+ */ > > +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & > > 0x00ff))) + > > +ab

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-23 Thread Ganesh Ajjanagadde
On Sun, Aug 23, 2015 at 9:57 AM, Ganesh Ajjanagadde wrote: > On Sun, Aug 23, 2015 at 4:20 AM, Nicolas George wrote: >> Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : >>> >> +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & >>> >> 0x00ff))) + >>> >> +

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-23 Thread Ganesh Ajjanagadde
On Sun, Aug 23, 2015 at 4:20 AM, Nicolas George wrote: > Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : >> >> +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & >> >> 0x00ff))) + >> >> +abs((int) (((c1 & 0xff00) >> 8) - ((c2 & 0xff00) >>

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-23 Thread Nicolas George
Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : > >> +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & > >> 0x00ff))) + > >> +abs((int) (((c1 & 0xff00) >> 8) - ((c2 & 0xff00) >> 8))) + > >> +abs((int) (((c1 & 0x00ff) >> 16) -

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-22 Thread Ganesh Ajjanagadde
On Sat, Aug 22, 2015 at 10:26 AM, Nicolas George wrote: > Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : >> +/* cast for -Wabsolute-value in clang 3.5+ */ >> +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & >> 0x00ff))) + >> +abs((int) (((

Re: [FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-22 Thread Nicolas George
Le quintidi 5 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit : > +/* cast for -Wabsolute-value in clang 3.5+ */ > +return abs((int) (t1 - t2)) + abs((int) ((c1 & 0x00ff) - (c2 & > 0x00ff))) + > +abs((int) (((c1 & 0xff00) >> 8) - ((c2 & 0xff00) >> 8))) + > +

[FFmpeg-devel] [PATCH] all: silence clang -Wabsolute-value for unsigned subtractions

2015-08-22 Thread Ganesh Ajjanagadde
Recent clang (3.5 onwards): http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html, http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20141006/116174.html introduces a new warning -Wabsolute-value. This patch shuts it up when we do safe unsigned subtractions with no overflow is