From 5c2b305183780b027f858fe597c416b794ad61de Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 22 Nov 2023 16:31:31 +0100 Subject: [PATCH 1/2] Issue #10414 Report warning with wrong file and wrong line number Analogous to the fix for `aqddtogroup` see @10416: As the `page` parts are joined together in one block the second block didn't know anymore where it came from originally which resulted in the wrong file name and line number. By adding some internal commands during processing this has been corrected. --- src/commentscan.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commentscan.l b/src/commentscan.l index 1ec5781347e..440ac1124c2 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1433,6 +1433,8 @@ STopt [^\n@\\]* unput_string(yytext,yyleng); //if (*yytext=='\n') yyextra->lineNr++; //addOutput(yyscanner,'\n'); + addOutput(yyscanner," \\ifile \""+ yyextra->fileName); + addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr)); BEGIN( Comment ); } {CMD}[<>] { From de8b7f6212dd0d71225ff7b2d6b3ba982748bd4a Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 22 Nov 2023 17:53:33 +0100 Subject: [PATCH 2/2] Issue #10414 Report warning with wrong file and wrong line number the `\iline` command gave a warning about: ``` warning: invalid argument for command '\iline' ``` --- src/commentscan.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 440ac1124c2..f2dab77cab6 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1381,7 +1381,7 @@ STopt [^\n@\\]* //if (*yytext=='\n') yyextra->lineNr++; //addOutput(yyscanner,'\n'); addOutput(yyscanner," \\ifile \""+ yyextra->fileName); - addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr)); + addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr) + " \\ilinebr "); BEGIN( Comment ); } . { // title (stored in type) @@ -1434,7 +1434,7 @@ STopt [^\n@\\]* //if (*yytext=='\n') yyextra->lineNr++; //addOutput(yyscanner,'\n'); addOutput(yyscanner," \\ifile \""+ yyextra->fileName); - addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr)); + addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr) + " \\ilinebr "); BEGIN( Comment ); } {CMD}[<>] {