Re: scripts/checkpatch: Concatenated strings should use spaces between elements

From: Joe Perches
Date: Tue Oct 17 2017 - 20:35:37 EST


On Wed, 2017-10-18 at 00:58 +0200, Heinrich Schuchardt wrote:
> On 10/18/2017 12:43 AM, Joe Perches wrote:
> > On Tue, 2017-10-17 at 23:17 +0200, Heinrich Schuchardt wrote:
> > > This patch creates a warning (CHECK)
> > > "Concatenated strings should use spaces between elements"
[]
> > > +void foo(void)
> > > +{
> > > + test(L"\"");
> >
> > In this case, L must be a constant string and you
> > are concatenating L and "\""
> >
> >
>
> See ISO/IEC 9899:1999
>
> 6.4.5 String literals
>
> <cite>
> A character string literal is a sequence of zero or more multibyte
> characters enclosed in double-quotes, as in "xyz"
> A wide string literal is the same, except prefixed by the
> letter L.
> </cite>
>
> L"foo" is a literal of type wchar_t * and not two strings.
> L is a qualifier and not a constant string.
>
> Just like ULL in 10ULL.

How about trying this: