diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-04-24 15:55:38 -0700 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-04-24 15:55:38 -0700 |
commit | d4b585c754f8599a6d9f604944fe13b05733d1a3 (patch) | |
tree | 4d6e2e7f9926b39fe826115c65db63fa30bbb65c | |
parent | 33dc9f2ed0fb18b4e5761424037abab132c729da (diff) | |
download | aiaiai-d4b585c754f8599a6d9f604944fe13b05733d1a3.tar.gz |
aiaiai-diff-log-helper: fix logs diffing for gcc-4.8
gcc 4.8 changed its output format a bit. Now it appends lines like this to the
warning messages:
net/ipv4/ip_tunnel.c:394:25: warning: variable ‘fbt’ set but not used [-Wunused-but-set-variable]
struct ip_tunnel *nt, *fbt;
^
Which made aiaiai output very messy. This patch fixes the problem.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rwxr-xr-x | helpers/aiaiai-diff-log-helper | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/helpers/aiaiai-diff-log-helper b/helpers/aiaiai-diff-log-helper index 2372391..5145a0b 100755 --- a/helpers/aiaiai-diff-log-helper +++ b/helpers/aiaiai-diff-log-helper @@ -46,7 +46,15 @@ Licence: GPLv2 # drivers/i.c: In function ‘gluebi_erase’: # drivers/i.c:177:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] # -# 4. Any other line comprises an independent block +# 4. All lines starting with a white-space after any of the above blocks are +# also part of the block, e.g., +# +# drivers/char/agp/isoch.c: In function ‘agp_3_5_enable’: +# drivers/char/agp/isoch.c:320:13: warning: variable ‘arqsz’ set but not used [-Wunused-but-set-variable] +# u32 isoch, arqsz; +# ^ +# +# 5. Any other line comprises an independent block import sys import os @@ -57,10 +65,12 @@ def gen_blocks(stream): """Parses input stream. Yields found blocks.""" btype, prefix, block = "", "", [] for line in stream: - # append line to the current block if prefix matches - if prefix and line.startswith(prefix): + # Append line to the current block if it starts with a white-space + if line.startswith(" "): + block.append(line) + # Append line to the current block if prefix matches + elif prefix and line.startswith(prefix): block.append(line) - # Define prefix for cases 2 and 3 for further processing elif not prefix and btype in ("ifi", "infunc"): block.append(line) |