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] --- ext/zend_test/php_test.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ext/zend_test/php_test.h') diff --git a/ext/zend_test/php_test.h b/ext/zend_test/php_test.h index 834c380362..5d9e31cc83 100644 --- a/ext/zend_test/php_test.h +++ b/ext/zend_test/php_test.h @@ -35,7 +35,17 @@ struct bug79096 { uint64_t b; }; -ZEND_API struct bug79096 bug79096(void); -ZEND_API void bug79532(off_t *array, size_t elems); +#ifdef PHP_WIN32 +# ifdef PHP_ZEND_TEST_EXPORTS +# define PHP_ZEND_TEST_API __declspec(dllexport) +# else +# define PHP_ZEND_TEST_API __declspec(dllimport) +# endif +#else +# define PHP_ZEND_TEST_API ZEND_API +#endif + +PHP_ZEND_TEST_API struct bug79096 bug79096(void); +PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems); #endif -- cgit v1.2.1