ALSA: hda/hdmi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
PATCH 1/1 ALSA: hda/hdmi: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length array declaration in union audio_infoframe with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for a flexible-array member in a union.
--- sound/pci/hda/patch_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_hdmi.c +1 -1
@@ -229,7 +229,7 @@ struct dp_audio_infoframe {union audio_infoframe {struct hdmi_audio_infoframe hdmi;struct dp_audio_infoframe dp; -u8 bytes[0 ]; + DECLARE_FLEX_ARRAY(u8, bytes); };/*
Signature · 1 line
2.34.1
Quoted 10 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length array declaration in union
audio_infoframewith the newDECLARE_FLEX_ARRAY()helper macro.This helper allows for a flexible-array member in a union.
Signature · 1 line
Kees Cook
Takashi Iwai
AppliedQuoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length array declaration in union
audio_infoframewith the newDECLARE_FLEX_ARRAY()helper macro.This helper allows for a flexible-array member in a union.
Thanks, applied to for-next branch.
Takashi