提交 660f0597 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

media: renesas-ceu: fix compiler warning

In function 'strncpy',
    inlined from 'ceu_notify_complete' at drivers/media/platform/renesas-ceu.c:1378:2:
include/linux/string.h:246:9: warning: '__builtin_strncpy' output truncated before terminating nul copying 11 bytes from a string of the same length [-Wstringop-truncation]
  return __builtin_strncpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 bcab64e8
...@@ -1375,7 +1375,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier) ...@@ -1375,7 +1375,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier)
return ret; return ret;
/* Register the video device. */ /* Register the video device. */
strncpy(vdev->name, DRIVER_NAME, strlen(DRIVER_NAME)); strlcpy(vdev->name, DRIVER_NAME, sizeof(vdev->name));
vdev->v4l2_dev = v4l2_dev; vdev->v4l2_dev = v4l2_dev;
vdev->lock = &ceudev->mlock; vdev->lock = &ceudev->mlock;
vdev->queue = &ceudev->vb2_vq; vdev->queue = &ceudev->vb2_vq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册