Re: [PATCH] rj54n1cb0c: remove compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Márton

On Sun, 3 Jan 2010, Németh Márton wrote:

> From: Márton Németh <nm127@xxxxxxxxxxx>
> 
> Remove the following compiler warning: 'dummy' is used uninitialized in this function.
> Although the result in the dummy variable is not used the program flow in
> soc_camera_limit_side() depends on the value in dummy. The program flow is better
> to be deterministic.
> 
> Signed-off-by: Márton Németh <nm127@xxxxxxxxxxx>

The patch is good, the only slight problem - you have non-ASCII characters 
in your name and you didn't use UTF-8 to send this mail, which, I think, 
is the accepted encoding in the Linux kernel. I converted your patch to 
utf8 and attached to this mail. Please verify that the result is correct.

> ---
> diff -r 62ee2b0f6556 linux/drivers/media/video/rj54n1cb0c.c
> --- a/linux/drivers/media/video/rj54n1cb0c.c	Wed Dec 30 18:19:11 2009 +0100
> +++ b/linux/drivers/media/video/rj54n1cb0c.c	Sun Jan 03 21:30:20 2010 +0100
> @@ -563,7 +563,7 @@
>  	struct i2c_client *client = sd->priv;
>  	struct rj54n1 *rj54n1 = to_rj54n1(client);
>  	struct v4l2_rect *rect = &a->c;
> -	unsigned int dummy, output_w, output_h,
> +	unsigned int dummy = 0, output_w, output_h,
>  		input_w = rect->width, input_h = rect->height;
>  	int ret;
> 

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
From nm127@xxxxxxxxxxx Sun Jan  3 21:38:51 2010
Date: Sun, 03 Jan 2010 21:34:59 +0100
From: Németh Márton <nm127@xxxxxxxxxxx>
To: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
Cc: Hans Verkuil <hverkuil@xxxxxxxxx>, V4L Mailing List <linux-media@xxxxxxxxxxxxxxx>
Subject: [PATCH] rj54n1cb0c: remove compiler warning

From: Márton Németh <nm127@xxxxxxxxxxx>

Remove the following compiler warning: 'dummy' is used uninitialized in this function.
Although the result in the dummy variable is not used the program flow in
soc_camera_limit_side() depends on the value in dummy. The program flow is better
to be deterministic.

Signed-off-by: Márton Németh <nm127@xxxxxxxxxxx>
---
diff -r 62ee2b0f6556 linux/drivers/media/video/rj54n1cb0c.c
--- a/linux/drivers/media/video/rj54n1cb0c.c	Wed Dec 30 18:19:11 2009 +0100
+++ b/linux/drivers/media/video/rj54n1cb0c.c	Sun Jan 03 21:30:20 2010 +0100
@@ -563,7 +563,7 @@
 	struct i2c_client *client = sd->priv;
 	struct rj54n1 *rj54n1 = to_rj54n1(client);
 	struct v4l2_rect *rect = &a->c;
-	unsigned int dummy, output_w, output_h,
+	unsigned int dummy = 0, output_w, output_h,
 		input_w = rect->width, input_h = rect->height;
 	int ret;

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux