Skip to content

Commit 83e4b63

Browse files
strerror is now thread safe
1 parent 9becbb6 commit 83e4b63

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

addons/threadsafety.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
'race:stdin',
9292
'race:stdout',
9393
'race:streams',
94-
'race:strerror',
9594
'race:strsignal',
9695
'race:strtok',
9796
'race:tmbuf',
@@ -261,7 +260,6 @@
261260
'siginterrupt',
262261
'sleep',
263262
'srand48',
264-
'strerror',
265263
'strsignal',
266264
'strtok',
267265
'tmpnam',

test/cli/other_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,9 @@ def test_addon_threadsafety(tmpdir):
458458
test_file = os.path.join(tmpdir, 'test.cpp')
459459
with open(test_file, 'wt') as f:
460460
f.write("""
461-
extern const char* f()
461+
extern void f()
462462
{
463-
return strerror(1);
463+
elf_fill(1);
464464
}
465465
""")
466466

@@ -472,7 +472,7 @@ def test_addon_threadsafety(tmpdir):
472472
assert lines == [
473473
'Checking {} ...'.format(test_file)
474474
]
475-
assert stderr == '{}:4:12: warning: strerror is MT-unsafe [threadsafety-unsafe-call]\n'.format(test_file)
475+
assert stderr == '{}:4:5: warning: elf_fill is MT-unsafe [threadsafety-unsafe-call]\n'.format(test_file)
476476

477477

478478
def test_addon_naming(tmpdir):
@@ -4749,4 +4749,4 @@ def test_ipc_inline_suppressions(tmp_path):
47494749
stdout_lines = stdout.splitlines()
47504750
stdout_lines.sort()
47514751
assert stdout_lines == stdout_exp
4752-
assert stderr.splitlines() == []
4752+
assert stderr.splitlines() == []

0 commit comments

Comments
 (0)