lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 8 Jul 2010 08:40:10 +0200
From:	Jean-Francois Moine <moinejf@...e.fr>
To:	"Justin P. Mattock" <justinmattock@...il.com>
Cc:	linux-media@...r.kernel.org, mchehab@...radead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH]video:gspca.c Fix  warning: case value '7' not in
 enumerated type 'enum v4l2_memory'

On Wed,  7 Jul 2010 21:46:18 -0700
"Justin P. Mattock" <justinmattock@...il.com> wrote:

> This fixes a warning I'm seeing when building:
>   CC [M]  drivers/media/video/gspca/gspca.o
> drivers/media/video/gspca/gspca.c: In function 'vidioc_reqbufs':
> drivers/media/video/gspca/gspca.c:1508:2: warning: case value '7' not
> in enumerated type 'enum v4l2_memory'

Hi Justin,

I don't agree with your patch: the value GSPCA_MEMORY_READ must not be
seen by user applications.

The warning may be simply fixed by (change the line numbers):

--- gspca.c~	2010-07-08 08:15:14.000000000 +0200
+++ gspca.c	2010-07-08 08:28:52.000000000 +0200
@@ -1467,7 +1467,8 @@ static int vidioc_reqbufs(struct file *f
 	struct gspca_dev *gspca_dev = priv;
 	int i, ret = 0, streaming;
 
-	switch (rb->memory) {
+	i = rb->memory;			/* (avoid compilation warning) */
+	switch (i) {
 	case GSPCA_MEMORY_READ:			/* (internal call) */
 	case V4L2_MEMORY_MMAP:
 	case V4L2_MEMORY_USERPTR:

Cheers.

-- 
Ken ar c'hentaƱ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ