This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alexander Riccio
Recipients Alexander Riccio
Date 2015-12-16.01:04:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The warnings that I've disabled are:

C4054, "'conversion' : from function pointer 'type1' to data pointer 'type2'":

    I disabled 4054because there are lots of void* to (somefuncptr) conversions in CPython. I couldn't see any problems with them, and they all seemed necessary.

C4100, "'identifier' : unreferenced formal parameter":

    I disabled C4100 because there are thousands of places in CPython where function parameters aren't referenced. Some of these could actually be bugs (!!), but right now there are too many benign cases of this to be of use. Commenting out parameter names where they're intentionally not referenced is an elegant way of suppressing this warning while documenting intent.

C4115, "'type' : named type definition in parentheses":

    I disabled C4115 because CPython appears to trigger it in benign conditions. This warning triggers when a function accepts a structure as an argument, and that structure type has not yet been properly declared.

C4127, "conditional expression is constant":

    I disabled C4127 because the do { } while (1) pattern is quite prevalent in CPython, and is unlikely to yield any useful warnings.

C4131, "'function' : uses old-style declarator":

    I disabled C4131 because CPython includes (third party) code that uses the silly old style C function declaration form.

C4152, "non standard extension, function/data ptr conversion in expression":

    I disabled C4152 for the same reason that I disabled C4054.

C4200, "nonstandard extension used : zero-sized array in struct/union":

    I disabled C4200 in a few projects, because this is a very common way of reducing memory allocations. Block allocations are trickier to correctly use, and don't have a standardized, safe, mechanism (not until C++17, at least), but they're just too darn useful & common to warn about every single use.

C4204, "nonstandard extension used : non-constant aggregate initializer":

    I disabled C4204 because CPython frequently initializes a struct with local variables. This is perfectly reasonable, despite ANSI C incompatibility.

C4244, "'conversion' conversion from 'type1' to 'type2', possible loss of data":

    I disabled C4244, if I remember correctly, because all instances appeared safe. I should revisit this one.

C4267, "'var' : conversion from 'size_t' to 'type', possible loss of data":

    I disabled C4267, if I remember correctly, because all instances appeared safe. I should revisit this one.

C4706, "assignment within conditional expression":

    I disabled C4706 because there's lots of code in CPython that allocates memory inside the conditional (i.e. `if (!(self = PyObject_New(Pdata, &Pdata_Type)))` from Pdata_New in _pickle.c), which is perfectly valid code. Even if it makes me nauseous. 

Running `build.bat -d -v --no-ssl --no-tkinter -c Debug -p x64` produces 524 warnings.
Date User Action Args
2015-12-16 01:04:39Alexander Ricciosetrecipients: + Alexander Riccio
2015-12-16 01:04:38Alexander Ricciosetmessageid: <>
2015-12-16 01:04:38Alexander Ricciolinkissue25878 messages
2015-12-16 01:04:37Alexander Ricciocreate