diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-20 16:19:15 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-21 00:35:30 +0100 |
commit | 645f705d6ac157ff29bbc45b7591d3a2f70b0b7f (patch) | |
tree | e3ae59a2d1d6d38f5d7376bfbeeb5e3937b49006 /libavcodec/x86/me_cmp_init.c | |
parent | 40cf317d09920e18045515cb867a512d071a6cf6 (diff) | |
download | ffmpeg-645f705d6ac157ff29bbc45b7591d3a2f70b0b7f.tar.gz |
av(codec|device): Don't cast pointers to int
C99/C11 6.3.2.3 5: "Any pointer type may be converted to an integer
type. [...] If the result cannot be represented in the integer type,
the behavior is undefined." So stop casting pointers to int; use
uintptr_t instead.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/x86/me_cmp_init.c')
-rw-r--r-- | libavcodec/x86/me_cmp_init.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c index 701eb1ab25..9af911bb88 100644 --- a/libavcodec/x86/me_cmp_init.c +++ b/libavcodec/x86/me_cmp_init.c @@ -131,7 +131,7 @@ static int vsad_intra16_mmx(MpegEncContext *v, uint8_t *pix, uint8_t *dummy, { int tmp; - av_assert2((((int) pix) & 7) == 0); + av_assert2(((uintptr_t) pix & 7) == 0); av_assert2((stride & 7) == 0); #define SUM(in0, in1, out0, out1) \ @@ -195,8 +195,8 @@ static int vsad16_mmx(MpegEncContext *v, uint8_t *pix1, uint8_t *pix2, { int tmp; - av_assert2((((int) pix1) & 7) == 0); - av_assert2((((int) pix2) & 7) == 0); + av_assert2(((uintptr_t)pix1 & 7) == 0); + av_assert2(((uintptr_t)pix2 & 7) == 0); av_assert2((stride & 7) == 0); #define SUM(in0, in1, out0, out1) \ |