mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 13:54:41 +00:00
eliminate GCC4 warnings
svn path=/trunk/; revision=15225
This commit is contained in:
parent
267f11a8b4
commit
7313b15dbd
|
@ -17,7 +17,7 @@ TARGET_INSTALLDIR := system32
|
||||||
TARGET_CFLAGS := \
|
TARGET_CFLAGS := \
|
||||||
-D__USE_W32API -DWIN32 -D_ROS_ \
|
-D__USE_W32API -DWIN32 -D_ROS_ \
|
||||||
-D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 \
|
-D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 \
|
||||||
-DUNICODE -fexceptions -Wall \
|
-DUNICODE -fexceptions -Wall -Wno-unused-value \
|
||||||
-I../../../include/expat
|
-I../../../include/expat
|
||||||
|
|
||||||
TARGET_CPPFLAGS := $(TARGET_CFLAGS)
|
TARGET_CPPFLAGS := $(TARGET_CFLAGS)
|
||||||
|
|
|
@ -8,7 +8,7 @@ CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
LINK = g++
|
LINK = g++
|
||||||
|
|
||||||
CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. -I$(EXPAT_INC)
|
CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -Wno-unused-value -I. -I$(EXPAT_INC)
|
||||||
RCFLAGS = -DWIN32 -D__WINDRES__
|
RCFLAGS = -DWIN32 -D__WINDRES__
|
||||||
LFLAGS = -Wl,--subsystem,windows
|
LFLAGS = -Wl,--subsystem,windows
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
LINK = g++
|
LINK = g++
|
||||||
|
|
||||||
CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. -I$(EXPAT_INC)
|
CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -Wno-unused-value -I. -I$(EXPAT_INC)
|
||||||
RCFLAGS = -DWIN32 -D__WINDRES__
|
RCFLAGS = -DWIN32 -D__WINDRES__
|
||||||
LFLAGS = -Wl,--subsystem,windows
|
LFLAGS = -Wl,--subsystem,windows
|
||||||
|
|
||||||
|
|
|
@ -115,25 +115,38 @@ template<typename BASE> struct IComSrvQI : public BASE
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0;
|
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv)
|
||||||
if (IsEqualIID(riid, _uuid_base) ||
|
{
|
||||||
IsEqualIID(riid, IID_IUnknown)) {*ppv=static_cast<BASE*>(this); this->AddRef(); return S_OK;}
|
*ppv = NULL;
|
||||||
return E_NOINTERFACE;}
|
|
||||||
|
if (IsEqualIID(riid, _uuid_base) || IsEqualIID(riid, IID_IUnknown))
|
||||||
|
{*ppv=static_cast<BASE*>(this); this->AddRef(); return S_OK;}
|
||||||
|
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
IComSrvQI() {}
|
IComSrvQI() {}
|
||||||
|
virtual ~IComSrvQI() {}
|
||||||
|
|
||||||
REFIID _uuid_base;
|
REFIID _uuid_base;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<> struct IComSrvQI<IUnknown> : public IUnknown
|
template<> struct IComSrvQI<IUnknown> : public IUnknown
|
||||||
{
|
{
|
||||||
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0;
|
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv)
|
||||||
if (IsEqualIID(riid, IID_IUnknown)) {*ppv=this; AddRef(); return S_OK;}
|
{
|
||||||
return E_NOINTERFACE;}
|
*ppv = NULL;
|
||||||
|
|
||||||
|
if (IsEqualIID(riid, IID_IUnknown))
|
||||||
|
{*ppv=this; AddRef(); return S_OK;}
|
||||||
|
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
IComSrvQI<IUnknown>() {}
|
IComSrvQI<IUnknown>() {}
|
||||||
|
virtual ~IComSrvQI<IUnknown>() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -455,6 +468,8 @@ protected:
|
||||||
|
|
||||||
struct DWebBrowserEvents2IF
|
struct DWebBrowserEvents2IF
|
||||||
{
|
{
|
||||||
|
virtual ~DWebBrowserEvents2IF() {}
|
||||||
|
|
||||||
virtual void StatusTextChange(const BStr& text)
|
virtual void StatusTextChange(const BStr& text)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -594,6 +609,9 @@ protected:
|
||||||
// MinGW defines a wrong FixedDWebBrowserEvents2 interface with virtual functions for DISPID calls, so we use our own, corrected version:
|
// MinGW defines a wrong FixedDWebBrowserEvents2 interface with virtual functions for DISPID calls, so we use our own, corrected version:
|
||||||
interface FixedDWebBrowserEvents2 : public IDispatch
|
interface FixedDWebBrowserEvents2 : public IDispatch
|
||||||
{
|
{
|
||||||
|
#ifdef __GNUC__
|
||||||
|
virtual ~FixedDWebBrowserEvents2() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject,
|
struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject,
|
||||||
|
|
Loading…
Reference in a new issue