[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANeU7QmZXJ0KqVvkLfqxF6CGx81KQ93S++ViR9smWRTj8_6Dtg@mail.gmail.com>
Date: Tue, 6 May 2014 12:59:34 -0700
From: Christopher Li <sparse@...isli.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Martin Kepplinger <martink@...teo.de>,
Greg KH <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org,
linux-kernel <linux-kernel@...r.kernel.org>,
burzalodowa@...il.com, Linux-Sparse <linux-sparse@...r.kernel.org>
Subject: Re: [PATCH] staging: rtl8192u: initialize array in C compliant way
On Tue, May 6, 2014 at 1:47 AM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
>> - bool search_dir[4] = {0, 0, 0, 0};
>> + bool search_dir[4] = {0};
>
> That's weird. The original code is valid but it generates a sparse
> warning.
>
> drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:58: warning: Initializer entry defined twice
> drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c:244:61: also defined here
>
> It has something to do with "_Bool" types. Changing it to "int" will
> also make the warning disappear. I've CC'd the sparse list to see if
> anyone knows what's happening.
This is easy reproducible with a small test case. It is a sparse bug for sure.
Let me take a look.
Chris
--
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