diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index fd2d1ee9a43..05c2f98e903 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -306,7 +306,7 @@ PHP_FUNCTION(com_get_active_object) if (FAILED(res)) { php_com_throw_exception(res, NULL); } else { - res = IUnknown_QueryInterface(unk, &IID_IDispatch, &obj); + res = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **) &obj); if (FAILED(res)) { php_com_throw_exception(res, NULL); diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 3ce2daddaa7..f8b4a828e15 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -303,7 +303,7 @@ PHP_METHOD(dotnet, __construct) IObjectHandle *handle = NULL; where = "QI: IObjectHandle"; - hr = IUnknown_QueryInterface(unk, &IID_IObjectHandle, &handle); + hr = IUnknown_QueryInterface(unk, &IID_IObjectHandle, (void**) &handle); if (SUCCEEDED(hr)) { where = "IObjectHandle_Unwrap"; @@ -312,7 +312,7 @@ PHP_METHOD(dotnet, __construct) if (V_VT(&unwrapped) == VT_UNKNOWN) { where = "Unwrapped, QI for IDispatch"; - hr = IUnknown_QueryInterface(V_UNKNOWN(&unwrapped), &IID_IDispatch, &V_DISPATCH(&obj->v)); + hr = IUnknown_QueryInterface(V_UNKNOWN(&unwrapped), &IID_IDispatch, (void **) &V_DISPATCH(&obj->v)); if (SUCCEEDED(hr)) { V_VT(&obj->v) = VT_DISPATCH; diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index a4544cd8854..c2d227eaa37 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -290,7 +290,7 @@ static zend_class_entry *helper_ce; static inline HRESULT get_persist_stream(php_com_persist_helper *helper) { if (!helper->ips && helper->unk) { - return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, &helper->ips); + return IUnknown_QueryInterface(helper->unk, &IID_IPersistStream, (void **) &helper->ips); } return helper->ips ? S_OK : E_NOTIMPL; } @@ -298,7 +298,7 @@ static inline HRESULT get_persist_stream(php_com_persist_helper *helper) static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper) { if (!helper->ipsi && helper->unk) { - return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, &helper->ipsi); + return IUnknown_QueryInterface(helper->unk, &IID_IPersistStreamInit, (void **) &helper->ipsi); } return helper->ipsi ? S_OK : E_NOTIMPL; } @@ -306,7 +306,7 @@ static inline HRESULT get_persist_stream_init(php_com_persist_helper *helper) static inline HRESULT get_persist_file(php_com_persist_helper *helper) { if (!helper->ipf && helper->unk) { - return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, &helper->ipf); + return IUnknown_QueryInterface(helper->unk, &IID_IPersistFile, (void **) &helper->ipf); } return helper->ipf ? S_OK : E_NOTIMPL; } @@ -545,7 +545,7 @@ CPH_METHOD(LoadFromStream) IDispatch *disp = NULL; /* we need to create an object and load using OleLoadFromStream */ - res = OleLoadFromStream(stm, &IID_IDispatch, &disp); + res = OleLoadFromStream(stm, &IID_IDispatch, (void **) &disp); if (SUCCEEDED(res)) { php_com_wrap_dispatch(return_value, disp, COMG(code_page)); diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 2e254e51a6c..23cbd078fb4 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -60,7 +60,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage) sa = SafeArrayCreate(VT_VARIANT, 1, &bound); /* get a lock on the array itself */ - SafeArrayAccessData(sa, &va); + SafeArrayAccessData(sa, (void **) &va); va = (VARIANT*)sa->pvData; /* now fill it in */ @@ -247,7 +247,7 @@ PHP_COM_DOTNET_API zend_result php_com_zval_from_variant(zval *z, VARIANT *v, in if (V_UNKNOWN(v) != NULL) { IDispatch *disp; - if (SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(v), &IID_IDispatch, &disp))) { + if (SUCCEEDED(IUnknown_QueryInterface(V_UNKNOWN(v), &IID_IDispatch, (void **) &disp))) { php_com_wrap_dispatch(z, disp, codepage); IDispatch_Release(disp); } else { diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c index 331aff32c98..d9a35f7d7f5 100644 --- a/ext/opcache/shared_alloc_win32.c +++ b/ext/opcache/shared_alloc_win32.c @@ -47,7 +47,7 @@ static void *mapping_base; static void zend_win_error_message(int type, char *msg, int err) { HANDLE h; - char *ev_msgs[2]; + const char *ev_msgs[2]; char *buf = php_win32_error_to_msg(err); h = RegisterEventSource(NULL, TEXT(ACCEL_EVENT_SOURCE)); diff --git a/sapi/phpdbg/phpdbg_win.c b/sapi/phpdbg/phpdbg_win.c index 349d9c6261e..0a61f78c039 100644 --- a/sapi/phpdbg/phpdbg_win.c +++ b/sapi/phpdbg/phpdbg_win.c @@ -20,7 +20,7 @@ #include "phpdbg.h" int mprotect(void *addr, size_t size, int protection) { - int var; + DWORD var; return (int)VirtualProtect(addr, size, protection == (PROT_READ | PROT_WRITE) ? PAGE_READWRITE : PAGE_READONLY, &var); }