mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 19:03:27 +08:00
Fix warnings in build-scripts/check_stdlib_usage.py
This commit is contained in:
parent
2070adb262
commit
1561d7c089
@ -149,7 +149,7 @@ words = [
|
|||||||
'wcsstr' ]
|
'wcsstr' ]
|
||||||
|
|
||||||
|
|
||||||
reg_comment_remove_content = re.compile('\/\*.*\*/')
|
reg_comment_remove_content = re.compile(r'\/\*.*\*/')
|
||||||
reg_comment_remove_content2 = re.compile('".*"')
|
reg_comment_remove_content2 = re.compile('".*"')
|
||||||
reg_comment_remove_content3 = re.compile(':strlen')
|
reg_comment_remove_content3 = re.compile(':strlen')
|
||||||
reg_comment_remove_content4 = re.compile('->free')
|
reg_comment_remove_content4 = re.compile('->free')
|
||||||
@ -165,7 +165,9 @@ def find_symbols_in_file(file, regex):
|
|||||||
"src/video/khronos",
|
"src/video/khronos",
|
||||||
"include/SDL3",
|
"include/SDL3",
|
||||||
"build-scripts/gen_audio_resampler_filter.c",
|
"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)
|
filename = pathlib.Path(file)
|
||||||
|
|
||||||
@ -199,6 +201,8 @@ def find_symbols_in_file(file, regex):
|
|||||||
continue
|
continue
|
||||||
if parsing_comment:
|
if parsing_comment:
|
||||||
continue
|
continue
|
||||||
|
if "//" in l:
|
||||||
|
l = l[:l.find("//")]
|
||||||
|
|
||||||
if regex.match(l):
|
if regex.match(l):
|
||||||
|
|
||||||
@ -243,7 +247,7 @@ def main():
|
|||||||
for w in words:
|
for w in words:
|
||||||
str += w + "|"
|
str += w + "|"
|
||||||
str = str[:-1]
|
str = str[:-1]
|
||||||
str += ")\("
|
str += r")\("
|
||||||
regex = re.compile(str)
|
regex = re.compile(str)
|
||||||
find_symbols_in_dir(SDL_ROOT, regex)
|
find_symbols_in_dir(SDL_ROOT, regex)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user