MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / check_MTunsafe

Function check_MTunsafe

addons/threadsafety.py:317–327  ·  view source on GitHub ↗

Look for functions marked MT-unsafe in their man pages. The MT-unsafe functions are listed in id_MTunsafe (and id_MTunsafe_full). That section of code can be regenerated by the external script MT-Unsafe.py

(cfg)

Source from the content-addressed store, hash-verified

315
316
317def check_MTunsafe(cfg):
318 """
319 Look for functions marked MT-unsafe in their man pages.
320
321 The MT-unsafe functions are listed in id_MTunsafe (and id_MTunsafe_full).
322 That section of code can be regenerated by the external script MT-Unsafe.py
323 """
324 for token in cfg.tokenlist:
325 if token.str in id_MTunsafe:
326 reportError(token, 'warning', token.str + ' is MT-unsafe',
327 'unsafe-call')
328
329
330if __name__ == '__main__':

Callers 1

threadsafety.pyFile · 0.85

Calls 1

reportErrorFunction · 0.70

Tested by

no test coverage detected