From b45bef53fc86335e9bbabfbafd2fe55a5890668d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 14 Aug 2018 14:42:08 -0400 Subject: [PATCH] Remove a bogus memset We get this warning: v4l.c:1154:39: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess] It's correct enough, but ->cap is already zeroed by the previous memset. Just remove the bogus one. Fixes: xorg/driver/xf86-video-v4l#1 Signed-off-by: Adam Jackson --- src/v4l.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/v4l.c b/src/v4l.c index f4b2b4b..0694d19 100644 --- a/src/v4l.c +++ b/src/v4l.c @@ -1137,7 +1137,6 @@ V4LInit(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **adaptors) pPPriv->nr = d; /* check device capabilities */ - memset(&pPPriv->cap, 0, sizeof(&pPPriv->cap)); if (-1 == ioctl(fd, VIDIOC_QUERYCAP, &pPPriv->cap) || 0 == (pPPriv->cap.capabilities & V4L2_CAP_VIDEO_OVERLAY)) { xf86Msg(X_ERROR, "v4l: %s: no overlay support\n",dev);