Re: [PATCH 1/2] kconfig: don't silently ignore unhandled characters

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

 



On Tue, 2014-11-04 at 14:14 +0000, Jan Beulich wrote:
> >>> On 04.11.14 at 15:06, <pebolle@xxxxxxxxxx> wrote:
> > On Tue, 2014-11-04 at 09:05 +0000, Jan Beulich wrote:
> >> @@ -920,7 +931,7 @@ static int input (void );
> >>  /* This used to be an fputs(), but since the string might contain NUL's,
> >>   * we now use fwrite().
> >>   */
> >> -#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
> >> +#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
> >>  #endif
> >>  
> >>  /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
> > 
> > But this hunk looks unrelated. Is this needed?
> 
> I think it should stay, even if my flex version may be slightly different
> from the one that was used originally. As above - it's simply a result
> of re-generating.

(This annoyed me enough to dive a bit deeper. This message is mainly to
archive my notes publicly.)

This #define was added in v3.1. See commit 2f76b358f9fb ("kconfig: regen
parser"). Commit explanations were probably a bit expensive then since
this is all the info we have: we don't know why this was done, nor how
(which program, which options, etc.).

Anyhow, I don't think ECHO is used anywhere. grepping for ECHO in
scripts/ finds dtc-lexer.lex.c_shipped, lex.lex.c_shipped, and this
file. In the other two _shipped files ECHO is actually used. So,
apparently it's not a bit of lex magic. The #define might as well be
removed.

I personally wouldn't bother to add this hunk, but who cares.


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux