summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-02-01 23:18:05 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-02-01 23:19:25 +0100
commit73d4efc596ad7d476dc303a88d251a903ed31136 (patch)
tree7177f128f2b9bdef9c267d946b768a6cc63ede51 /libavutil
parent1a9c6cc41102b4b4228f3db18f32ef9f819bc6bc (diff)
downloadffmpeg-73d4efc596ad7d476dc303a88d251a903ed31136.tar.gz
lavu/imgutils: Use FFABS() instead of abs() for ptrdiff_t.
Fixes a warning with clang: libavutil/imgutils.c:314:16: warning: absolute value function 'abs' given an argument of type 'ptrdiff_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/imgutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c
index afc73e2def..c733cb5cf5 100644
--- a/libavutil/imgutils.c
+++ b/libavutil/imgutils.c
@@ -311,8 +311,8 @@ static void image_copy_plane(uint8_t *dst, ptrdiff_t dst_linesize,
{
if (!dst || !src)
return;
- av_assert0(abs(src_linesize) >= bytewidth);
- av_assert0(abs(dst_linesize) >= bytewidth);
+ av_assert0(FFABS(src_linesize) >= bytewidth);
+ av_assert0(FFABS(dst_linesize) >= bytewidth);
for (;height > 0; height--) {
memcpy(dst, src, bytewidth);
dst += dst_linesize;