Skip to contentSkip to conversation

include/sound/soc-dai.h: "codec" declared twice

DISCUSSION Jeff Garzik 1 participant 1 message Apr 28, 2009

lore
Share & tools
lore
#0 lore raw

Compiling with LLVM's clang yielded this:

Quoted 7 lines

include/sound/soc-dai.h:224:25: error: member of anonymous union redeclares 'codec'

                struct snd_soc_codec *codec;
                                      ^
include/sound/soc-dai.h:214:24: note: previous declaration is here
        struct snd_soc_codec *codec;
                              ^

2 diagnostics generated.

And indeed, we see

struct snd_soc_dai {
[...]

        /* DAI runtime info */
        struct snd_pcm_runtime *runtime;
        struct snd_soc_codec *codec;

[...]

        /* parent codec/platform */
        union {
                struct snd_soc_codec *codec;
                struct snd_soc_platform *platform;
        };

        struct list_head list;
};