From 1561d7c08938b27c9a80e1a3d204473a2381b660 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 25 Sep 2024 19:16:46 +0200 Subject: [PATCH] Fix warnings in build-scripts/check_stdlib_usage.py --- build-scripts/check_stdlib_usage.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build-scripts/check_stdlib_usage.py b/build-scripts/check_stdlib_usage.py index 93e1333af..32a558041 100755 --- a/build-scripts/check_stdlib_usage.py +++ b/build-scripts/check_stdlib_usage.py @@ -149,7 +149,7 @@ words = [ 'wcsstr' ] -reg_comment_remove_content = re.compile('\/\*.*\*/') +reg_comment_remove_content = re.compile(r'\/\*.*\*/') reg_comment_remove_content2 = re.compile('".*"') reg_comment_remove_content3 = re.compile(':strlen') reg_comment_remove_content4 = re.compile('->free') @@ -165,7 +165,9 @@ def find_symbols_in_file(file, regex): "src/video/khronos", "include/SDL3", "build-scripts/gen_audio_resampler_filter.c", - "build-scripts/gen_audio_channel_conversion.c" ] + "build-scripts/gen_audio_channel_conversion.c", + "test/win32/sdlprocdump.c", + ] filename = pathlib.Path(file) @@ -199,6 +201,8 @@ def find_symbols_in_file(file, regex): continue if parsing_comment: continue + if "//" in l: + l = l[:l.find("//")] if regex.match(l): @@ -243,7 +247,7 @@ def main(): for w in words: str += w + "|" str = str[:-1] - str += ")\(" + str += r")\(" regex = re.compile(str) find_symbols_in_dir(SDL_ROOT, regex)