Alexander Riccio added the comment: > The problem with this bug report is that there is little chance that it gets > resolved in the near term, and it's quite possible that it will stay open for > years. Somebody would have to sit down and start producing patches to fix > these warnings correctly, before the actual patch can be applied.
That's perfectly reasonable. In the mean time, we may be able to dramatically reduce the timetable by suppressing warnings - C4232 for example - which don't offer anything on a case-by-case basis. C4232(*), for example, warns any time we use the address of a `dllimport`ed function. mpd_mallocfunc, mpd_free, and friends - see https://hg.python.org/cpython/file/tip/Modules/_decimal/libmpdec/memory.c#l44 - are assigned malloc, free, etc... but is it safe to ignore? And then there are warnings that are safe to ignore in certain places, like C4310 in the _Py_ERROR_SURROGATEESCAPE case of PyUnicode_DecodeASCII in unicodeobject.c (https://hg.python.org/cpython/file/tip/Objects/unicodeobject.c#l6897): if (error_handler == _Py_ERROR_REPLACE) PyUnicode_WRITE(kind, data, writer.pos, 0xfffd); ...(here, the constant value 0xfffd is cast to a Py_UCS1, truncating it, inside a macro) but are not valid in others, like these insertint calls in PyInit_msvcrt, in msvcrtmodule.c (https://hg.python.org/cpython/file/tip/PC/msvcrtmodule.c#l538): insertint(d, "CRTDBG_FILE_STDERR", (int)_CRTDBG_FILE_STDERR); insertint(d, "CRTDBG_FILE_STDOUT", (int)_CRTDBG_FILE_STDOUT); insertint(d, "CRTDBG_REPORT_FILE", (int)_CRTDBG_REPORT_FILE); ...(here, _CRTDBG_FILE_STDERR, _CRTDBG_FILE_STDOUT, and _CRTDBG_REPORT_FILE, are _HFILEs, which is a void*, here {((_HFILE)(intptr_t)-4), ((_HFILE)(intptr_t)-5), and ((_HFILE)(intptr_t)-6)} respectively; the void* is truncated to an int in 64 bit builds) (*)C4232, "nonstandard extension used : 'identifier' : address of dllimport 'dllimport' is not static, identity not guaranteed", (https://msdn.microsoft.com/en-us/library/9a1sy630.aspx) I will try to sort a few of the easy categories, so we can discuss more generally. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25878> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com