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]
Message-Id: <20101109090123.6a12f3f2.randy.dunlap@oracle.com>
Date:	Tue, 9 Nov 2010 09:01:23 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	dave@....org
Cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: 8250: fix uninitialized compiler warning

On Tue, 09 Nov 2010 13:55:23 -0300 Davidlohr Bueso wrote:

> From: Davidlohr Bueso <dave@....org>
> 
> This addresses:
> 
>   CC [M]  drivers/serial/8250.o
> drivers/serial/8250.c: In function ‘serial8250_shutdown’:
> drivers/serial/8250.c:1696: warning: ‘i’ may be used uninitialized in this function
> drivers/serial/8250.c:1696: note: ‘i’ was declared here

so in your analysis of this compiler warning, was the warning correct & justified,
or was it false?  I.e., is the init to NULL needed?

If it was false, could we just quieten the warning by using:

	struct irq_info *unitialized_var(i);

plus #include <linux/compiler.h> ?


> Signed-off-by: Davidlohr Bueso <dave@....org>
> ---
>  drivers/serial/8250.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> index 4d8e14b..f734eee 100644
> --- a/drivers/serial/8250.c
> +++ b/drivers/serial/8250.c
> @@ -1693,7 +1693,7 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
>  
>  static void serial_unlink_irq_chain(struct uart_8250_port *up)
>  {
> -	struct irq_info *i;
> +	struct irq_info *i = NULL;
>  	struct hlist_node *n;
>  	struct hlist_head *h;
>  
> -- 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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