eliminate GCC4 warnings

svn path=/trunk/; revision=15225
This commit is contained in:
Martin Fuchs 2005-05-11 19:11:27 +00:00
parent 267f11a8b4
commit 7313b15dbd
4 changed files with 28 additions and 10 deletions

View file

@ -17,7 +17,7 @@ TARGET_INSTALLDIR := system32
TARGET_CFLAGS := \
-D__USE_W32API -DWIN32 -D_ROS_ \
-D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 \
-DUNICODE -fexceptions -Wall \
-DUNICODE -fexceptions -Wall -Wno-unused-value \
-I../../../include/expat
TARGET_CPPFLAGS := $(TARGET_CFLAGS)

View file

@ -8,7 +8,7 @@ CC = gcc
CXX = 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__
LFLAGS = -Wl,--subsystem,windows

View file

@ -10,7 +10,7 @@ CC = gcc
CXX = 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__
LFLAGS = -Wl,--subsystem,windows

View file

@ -115,25 +115,38 @@ template<typename BASE> struct IComSrvQI : public BASE
{
}
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0;
if (IsEqualIID(riid, _uuid_base) ||
IsEqualIID(riid, IID_IUnknown)) {*ppv=static_cast<BASE*>(this); this->AddRef(); return S_OK;}
return E_NOINTERFACE;}
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv)
{
*ppv = NULL;
if (IsEqualIID(riid, _uuid_base) || IsEqualIID(riid, IID_IUnknown))
{*ppv=static_cast<BASE*>(this); this->AddRef(); return S_OK;}
return E_NOINTERFACE;
}
protected:
IComSrvQI() {}
virtual ~IComSrvQI() {}
REFIID _uuid_base;
};
template<> struct IComSrvQI<IUnknown> : public IUnknown
{
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0;
if (IsEqualIID(riid, IID_IUnknown)) {*ppv=this; AddRef(); return S_OK;}
return E_NOINTERFACE;}
STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv)
{
*ppv = NULL;
if (IsEqualIID(riid, IID_IUnknown))
{*ppv=this; AddRef(); return S_OK;}
return E_NOINTERFACE;
}
protected:
IComSrvQI<IUnknown>() {}
virtual ~IComSrvQI<IUnknown>() {}
};
@ -455,6 +468,8 @@ protected:
struct DWebBrowserEvents2IF
{
virtual ~DWebBrowserEvents2IF() {}
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:
interface FixedDWebBrowserEvents2 : public IDispatch
{
#ifdef __GNUC__
virtual ~FixedDWebBrowserEvents2() {}
#endif
};
struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject,