Commit 5dcf375f authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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.
parent 50379cc4
Showing with 2 additions and 1 deletion
+2 -1
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment