Re: [PATCH 2/3] ASoC: wm9713: Use empty struct initializer

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

 



On Wed, Feb 14, 2018 at 2:41 PM, Richard Fitzgerald
<rf@xxxxxxxxxxxxxxxxxxxxx> wrote:

> This is the actual problem you are trying to fix? The comment about
> { 0 } only clearing the first member is probably bogus, your actual
> problem is that it should have been { NULL } ?

Changing to { NULL } fixes the sparse warning, but that would be a
fragile fix because it relies on the order of the struct members.

If someday the struct changes in a way so that the first member is no
longer a pointer, then we will have issues again.

Using {} is more error prone.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux