Search Linux Wireless

Re: [PATCH] Fix uninitialized-variable warnings.

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

 



On 04/12/2013 05:20 PM, Han Shen(沈涵) wrote:
Hi, Joe's patch (the 1-line fix) does not work for me. The assignment
is in a conditional block, when refer to this ofdm_index_old later, I
still get error -

/mnt/host/source/src/third_party/kernel/files/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:771:31:
error: 'ofdm_index_old[1]' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
      rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i];

(I'm working on 3.4 branch.)

I would get rid of the -Werror=maybe-unitialized. Sometimes gcc generates a false warning, and you really should not error the build in that case.

The correct patch needs to initialize the array to 0, and set the element the way Joe's patch does.

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux