[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] xen: avoid use of uninitialized variable
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 1/2] xen: avoid use of uninitialized variable |
Date: |
Thu, 20 Mar 2014 02:34:54 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Hello,
Justus Winter, le Wed 19 Mar 2014 16:13:12 +0100, a écrit :
> Found using the Clang Static Analyzer.
>
> * xen/console.c (hypputc): Initialize variable "complain".
This was actually meant to be static, now fixed.
Thanks,
Samuel
> ---
> xen/console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/console.c b/xen/console.c
> index 884376f..cb330b5 100644
> --- a/xen/console.c
> +++ b/xen/console.c
> @@ -47,7 +47,7 @@ int hypputc(int c)
> hyp_console_io(CONSOLEIO_write, 1, kvtolin(&d));
> } else {
> spl_t spl = splhigh();
> - int complain;
> + int complain = 0;
> simple_lock(&outlock);
> while (hyp_ring_smash(console->out, console->out_prod,
> console->out_cons)) {
> if (!complain) {
> --
> 1.9.0
>
--
Samuel
#ifndef I_WISH_WORLD_WERE_PERFECT
/* It is not :-( All the routers (except for Linux) return only
...
-+- linux/net/ipv4/ipip.c -+-