Re: [PATCH][next] smb: smb2pdu.h: Use static_assert() to check struct sizes

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

 



2024년 8월 9일 (금) 오전 7:04, Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>님이 작성:
>
> Commit 9f9bef9bc5c6 ("smb: smb2pdu.h: Avoid -Wflex-array-member-not-at-end
> warnings") introduced tagged `struct create_context_hdr`. We want to
> ensure that when new members need to be added to the flexible structure,
> they are always included within this tagged struct.
>
> So, we use `static_assert()` to ensure that the memory layout for
> both the flexible structure and the tagged struct is the same after
> any changes.
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx>

Thanks!





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux