Re: [PATCH] staging: rtl8192u: initialize array in C compliant way

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

 



On Tue, May 6, 2014 at 1:47 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux