linting: skip the introductory message produced by 'gcc -fshow-column'

Assume that a linter line that contains an actual error message or
warning includes a colon followed by a space -- something that that
opening message from a modern gcc lacks.
master
Benno Schulenberg 2017-07-28 21:26:23 +02:00
parent 50379cc4ff
commit 5dcf375f33
1 changed files with 2 additions and 1 deletions

View File

@ -3152,7 +3152,8 @@ void do_linter(void)
* filenameorcategory:line,column:message (e.g. pylint)
* filenameorcategory:line:message (e.g. pyflakes)
*/
if ((filename = strtok(read_buff_word, ":")) != NULL) {
if (strstr(message, ": ") != NULL) {
filename = strtok(read_buff_word, ":");
if ((linestr = strtok(NULL, ":")) != NULL) {
if ((maybecol = strtok(NULL, ":")) != NULL) {
ssize_t tmplineno = 0, tmpcolno = 0;