aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-07-30 10:05:39 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-07-30 10:05:39 +0200
commit50b30c46ac6ae92a80167054e3dd691181db21c6 (patch)
tree8a683734dc792d4b56e421a1996239523db47f82 /contrib
parent19bcfae7cf18b67443f71aca4fb1398d122b57dd (diff)
sliced-vbi-test: fix gcc-8.1 warning
In function ‘decode_cc’, inlined from ‘process’ at sliced-vbi-test.c:416:3, inlined from ‘main’ at sliced-vbi-test.c:464:4: sliced-vbi-test.c:177:4: warning: ‘memcpy’ accessing 62 bytes at offsets 0 and 2 overlaps 60 bytes at offset 2 [-Wrestrict] memcpy(cc, cc + 2, cc_idx); ^~~~~~~~~~~~~~~~~~~~~~~~~~ Replace memcpy by memmove. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/test/sliced-vbi-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/test/sliced-vbi-test.c b/contrib/test/sliced-vbi-test.c
index 993b3e33..47fec05e 100644
--- a/contrib/test/sliced-vbi-test.c
+++ b/contrib/test/sliced-vbi-test.c
@@ -174,7 +174,7 @@ static void decode_cc(struct v4l2_sliced_vbi_data *s)
if (cc_idx >= CC_SIZE) {
cc_idx = CC_SIZE - 2;
- memcpy(cc, cc + 2, cc_idx);
+ memmove(cc, cc + 2, cc_idx);
}
cc[cc_idx++] = c;

Privacy Policy