misc: bcm-vk: avoid -Wflex-array-member-not-at-end warning
Subsystems (2)
RFC 1/1 misc: bcm-vk: avoid -Wflex-array-member-not-at-end warning
Hi all,
I'm trying to fix the following warning:
drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
after a quick look, I don't see any code directly using the flexible array data[], so this patch should probably suffice:
drivers/misc/bcm-vk/bcm_vk.h +0 -1
@@ -311,7 +311,6 @@ struct bcm_vk_peer_log {u32 wr_idx;u32 buf_size;u32 mask; -char data[]; };
What do you think?
Thanks
--
Gustavo
Scott Branden
maintainerHi Gustavo,
Quoted 20 lines · Gustavo A. R. Silva
Hi all,
I'm trying to fix the following warning:
drivers/misc/bcm-vk/bcm_vk.h:415:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]after a quick look, I don't see any code directly using the flexible array
data[], so this patch should probably suffice:drivers/misc/bcm-vk/bcm_vk.h +0
-1@@ -311,7 +311,6 @@ struct bcm_vk_peer_log {u32 wr_idx;u32 buf_size;u32 mask; -char data[]; };
Quoted 1 line
What do you think?
If it is changed to data[0] does the warning go away? If not, you could remove it or change the code to use it instead of the sizeof used to calculate peer offset.
Quoted 4 lines
Thanks
--
Gustavo