From 5a04796f760a9e4770ccca5006ec5076dec0450c Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 27 May 2020 09:58:10 +0200 Subject: Fix MSVC level 1 (severe) warnings We fix (hopefully) all instances of: * * * * * * * * `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] --- sapi/phpdbg/phpdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg.c') diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index f9777c5adb..78aa34f524 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -2071,7 +2071,7 @@ phpdbg_out: settings->oplog = PHPDBG_G(oplog); settings->prompt[0] = PHPDBG_G(prompt)[0]; settings->prompt[1] = PHPDBG_G(prompt)[1]; - memcpy(settings->colors, PHPDBG_G(colors), sizeof(settings->colors)); + memcpy(ZEND_VOIDP(settings->colors), PHPDBG_G(colors), sizeof(settings->colors)); settings->eol = PHPDBG_G(eol); settings->input_buflen = PHPDBG_G(input_buflen); memcpy(settings->input_buffer, PHPDBG_G(input_buffer), settings->input_buflen); -- cgit v1.2.1