Alexander Riccio <[email protected]> added the comment:
I decided to come back to this after a python meetup last night. By messing
with this a bit, building in VS2019 with /W4, I see that fully 2/3rds of the
total warnings are from two specific warnings:
C4100 (unreferenced formal parameter)
C4127 (conditional expression is constant)
...This seems to be a stylistic thing across the codebase. If it were a new
codebase, I'd simply recommend not giving unreferenced formal parameters a
variable name - the typical way of doing it - but there's no way anybody is
gonna care enough to comment them out across the whole codebase. C4127 is not A
Big Deal, since dispatching based on data type sizes in conditionals is just
the easiest way to do The Right Thing in C.
The rest of the warnings are mostly datatype coercions ('=': conversion from
'int' to 'char', possible loss of data), old style declarators, and a bunch of
type indirection mismatches ('function': 'volatile int *' differs in
indirection to slightly different base types from 'volatile long *'), type cast
truncation ('type cast': truncation from 'volatile __int64' to 'PyThreadState
*'), named type declarations in parenthesis ('timeval': named type definition
in parentheses), and assignments in conditionals (which I don't like, but are
not a huge deal).
There really are only a few things that actually look sketchy. For example, in
run_child (launcher.c), SetInformationJobObject is passing sizeof(info) as
cbJobObjectInformationLength, where it should instead be the local variable rc.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue25878>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com