mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Resolve -Wincompatible-pointer-types warnings (GH-17456)
The phpdbg issue is a real issue, although it's unlikely that harm can be done due to stack alignment and little-endianess. The others seem to be more cosmetic.
This commit is contained in:
parent
f99d62013b
commit
26bf239e6d
6 changed files with 11 additions and 11 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue