Re: [PATCH v2] smb: server: Fix building with GCC 15

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

 



On Tue, Nov 26, 2024 at 3:12 PM Brahmajit Das <brahmajit.xyz@xxxxxxxxx> wrote:
>
> GCC 15 introduces -Werror=unterminated-string-initialization by default,
> this results in the following build error
>
> fs/smb/server/smb_common.c:21:35: error: initializer-string for array of 'char' is too long [-Werror=unterminated-string-ini
> tialization]
>    21 | static const char basechars[43] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_-!@#$%";
>       |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> To this we are replacing char basechars[43] with a character pointer
> and then using strlen to get the length.
>
> Signed-off-by: Brahmajit Das <brahmajit.xyz@xxxxxxxxx>
Applied it to #ksmbd-for-next-next.
Thanks!





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

  Powered by Linux