rk: clang-wrapper.py: Ignore #pragma-messages warning

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id0dc4f3dbcc9debe03e602972c515b57f416e487
This commit is contained in:
Tao Huang
2023-06-20 14:17:33 +08:00
parent 2f20047853
commit b40b8ac1de

View File

@@ -50,11 +50,13 @@ ofile = None
do_exit = False;
warning_re = re.compile(r'''(.*/|)([^/]+\.[a-z]+:\d+):(\d+:)? warning:''')
warning_re = re.compile(r'''(.*/|)([^/]+\.[a-z]+:\d+):(\d+:)? warning: .* \[-W(.*)\]''')
def interpret_warning(line):
"""Decode the message from clang. The messages we care about have a filename, and a warning"""
line = line.rstrip('\n')
m = warning_re.match(line)
if m and m.group(4) == "#pragma-messages":
return
if m and m.group(2) not in allowed_warnings:
print ("error, forbidden warning:" + m.group(2))