Re: [PATCH] gspca/gl860-mi1320/ov9655: avoid -Wstring-concatenation warning

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

 



On Mon, Oct 4, 2021 at 4:09 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>
> Newer clang versions are suspicious of definitions that mix concatenated
> strings with comma-separated arrays of strings, this has found real bugs
> elsewhere, but this seems to be a false positive:
>
> drivers/media/usb/gspca/gl860/gl860-mi1320.c:62:37: error: suspicious concatenation of string literals in an array initialization; did you
> mean to separate the elements with a comma? [-Werror,-Wstring-concatenation]
>         "\xd3\x02\xd4\x28\xd5\x01\xd0\x02" "\xd1\x18\xd2\xc1"
>                                            ^
>                                           ,
> drivers/media/usb/gspca/gl860/gl860-mi1320.c:62:2: note: place parentheses around the string literal to silence warning
>         "\xd3\x02\xd4\x28\xd5\x01\xd0\x02" "\xd1\x18\xd2\xc1"
>
> Replace the string literals by compound initializers, using normal hex numbers.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> Reported-by: Arnd Bergmann <arnd@xxxxxxxx>

Looks good to me, much nicer than the original or my earlier patch.

Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux