mirror of
https://github.com/php/php-src.git
synced 2024-12-03 23:05:57 +08:00
Suppress static analyzer warnings in specialized executor
As things like if(0) will be removed by the compiler, no need to see that tons of warnings with static analyzer enabled.
This commit is contained in:
parent
38f9c515cd
commit
716fc80fda
@ -20,6 +20,13 @@
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
# pragma warning(once : 4101)
|
||||
# pragma warning(once : 6235)
|
||||
# pragma warning(once : 6237)
|
||||
# pragma warning(once : 6239)
|
||||
# pragma warning(once : 6240)
|
||||
# pragma warning(once : 6285)
|
||||
# pragma warning(once : 6286)
|
||||
# pragma warning(once : 6326)
|
||||
#endif
|
||||
static user_opcode_handler_t zend_user_opcode_handlers[256] = {
|
||||
(user_opcode_handler_t)NULL,
|
||||
|
@ -1189,8 +1189,26 @@ function gen_vm($def, $skel) {
|
||||
// Insert header
|
||||
out($f, $GLOBALS['header_text']);
|
||||
|
||||
out($f, "#ifdef ZEND_WIN32\n");
|
||||
// Suppress free_op1 warnings on Windows
|
||||
out($f, "#ifdef ZEND_WIN32\n# pragma warning(once : 4101)\n#endif\n");
|
||||
out($f, "# pragma warning(once : 4101)\n");
|
||||
if (ZEND_VM_SPEC) {
|
||||
// Suppress (<non-zero constant> || <expression>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6235)\n");
|
||||
// Suppress (<zero> && <expression>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6237)\n");
|
||||
// Suppress (<non-zero constant> && <expression>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6239)\n");
|
||||
// Suppress (<expression> && <non-zero constant>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6240)\n");
|
||||
// Suppress (<non-zero constant> || <non-zero constant>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6285)\n");
|
||||
// Suppress (<non-zero constant> || <expression>) warnings on windows
|
||||
out($f, "# pragma warning(once : 6286)\n");
|
||||
// Suppress constant with constant comparsion warnings on windows
|
||||
out($f, "# pragma warning(once : 6326)\n");
|
||||
}
|
||||
out($f, "#endif\n");
|
||||
|
||||
// Support for ZEND_USER_OPCODE
|
||||
out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
|
||||
|
Loading…
Reference in New Issue
Block a user