All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compile warning: Dereferencing type-punned pointer will break strict-aliasing rules.
@ 2011-05-23 11:13 Hans Petter Selasky
  0 siblings, 0 replies; only message in thread
From: Hans Petter Selasky @ 2011-05-23 11:13 UTC (permalink / raw)
  To: linux-media; +Cc: Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 6 bytes --]

--HPS

[-- Attachment #2: dvb-usb-0007.patch --]
[-- Type: text/x-patch, Size: 1334 bytes --]

From c7a1e3b3f761a8bd75799248dd83499f59eaedae Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hselasky@c2i.net>
Date: Mon, 23 May 2011 13:13:06 +0200
Subject: [PATCH] Fix compile warning: Dereferencing type-punned pointer will break strict-aliasing rules.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
---
 drivers/media/video/v4l2-ioctl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 506edcc..213ba7d 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -2264,7 +2264,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
 				break;
 			}
 			*user_ptr = (void __user *)buf->m.planes;
-			*kernel_ptr = (void **)&buf->m.planes;
+			*kernel_ptr = (void *)&buf->m.planes;
 			*array_size = sizeof(struct v4l2_plane) * buf->length;
 			ret = 1;
 		}
@@ -2278,7 +2278,7 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size,
 
 		if (ctrls->count != 0) {
 			*user_ptr = (void __user *)ctrls->controls;
-			*kernel_ptr = (void **)&ctrls->controls;
+			*kernel_ptr = (void *)&ctrls->controls;
 			*array_size = sizeof(struct v4l2_ext_control)
 				    * ctrls->count;
 			ret = 1;
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-23 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 11:13 [PATCH] Fix compile warning: Dereferencing type-punned pointer will break strict-aliasing rules Hans Petter Selasky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.