eliminate GCC4 warnings (patch by Thomas Weidenmueller) Modified: trunk/reactos/subsys/system/explorer/i386-stub-win32.c Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.h Modified: trunk/reactos/subsys/system/explorer/shell/webchild.h Modified: trunk/reactos/subsys/system/explorer/utility/dragdropimpl.h Modified: trunk/reactos/subsys/system/explorer/utility/shellbrowserimpl.h _____
Modified: trunk/reactos/subsys/system/explorer/i386-stub-win32.c --- trunk/reactos/subsys/system/explorer/i386-stub-win32.c 2005-05-11 17:37:46 UTC (rev 15223) +++ trunk/reactos/subsys/system/explorer/i386-stub-win32.c 2005-05-11 19:08:36 UTC (rev 15224) @@ -524,10 +524,10 @@
/* scan for the sequence $<data>#<checksum> */
-unsigned char * +char * getpacket (void) { - unsigned char *buffer = &remcomInBuffer[0]; + char *buffer = &remcomInBuffer[0]; unsigned char checksum; unsigned char xmitcsum; int count; @@ -597,7 +597,7 @@ /* send the packet in buffer. */
void -putpacket (unsigned char *buffer) +putpacket (char *buffer) { unsigned char checksum; int count; _____
Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.h --- trunk/reactos/subsys/system/explorer/shell/shellbrowser.h 2005-05-11 17:37:46 UTC (rev 15223) +++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.h 2005-05-11 19:08:36 UTC (rev 15224) @@ -50,6 +50,7 @@
struct BrowserCallback { + virtual ~BrowserCallback() {} virtual void entry_selected(Entry* entry) = 0; };
_____
Modified: trunk/reactos/subsys/system/explorer/shell/webchild.h --- trunk/reactos/subsys/system/explorer/shell/webchild.h 2005-05-11 17:37:46 UTC (rev 15223) +++ trunk/reactos/subsys/system/explorer/shell/webchild.h 2005-05-11 19:08:36 UTC (rev 15224) @@ -1,5 +1,5 @@
/* - * Copyright 2004 Martin Fuchs + * Copyright 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -115,25 +115,38 @@ { }
- 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 @@
struct DWebBrowserEvents2IF { + virtual ~DWebBrowserEvents2IF() {} + virtual void StatusTextChange(const BStr& text) {}
@@ -594,6 +609,9 @@ // 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, _____
Modified: trunk/reactos/subsys/system/explorer/utility/dragdropimpl.h --- trunk/reactos/subsys/system/explorer/utility/dragdropimpl.h 2005-05-11 17:37:46 UTC (rev 15223) +++ trunk/reactos/subsys/system/explorer/utility/dragdropimpl.h 2005-05-11 19:08:36 UTC (rev 15224) @@ -52,10 +52,12 @@
class IDropSourceImpl : public IDropSource { long m_cRefCount; + public: bool m_bDropped;
IDropSourceImpl::IDropSourceImpl() : m_cRefCount(0), m_bDropped(false) {} + virtual ~IDropSourceImpl() {}
//IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface( _____
Modified: trunk/reactos/subsys/system/explorer/utility/shellbrowserimpl.h --- trunk/reactos/subsys/system/explorer/utility/shellbrowserimpl.h 2005-05-11 17:37:46 UTC (rev 15223) +++ trunk/reactos/subsys/system/explorer/utility/shellbrowserimpl.h 2005-05-11 19:08:36 UTC (rev 15224) @@ -29,7 +29,7 @@
#ifdef __MINGW32__ #include "servprov.h" // for IServiceProvider -#include "docobj.h" // for IOleCommandTarget +#include "docobj.h" // for IOleCommandTarget #endif
@@ -45,45 +45,49 @@ { }
+ virtual ~IShellBrowserImpl() + { + } + virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void** ppvObject);
virtual ULONG STDMETHODCALLTYPE AddRef() {return ++_dwRef;} virtual ULONG STDMETHODCALLTYPE Release() {return --_dwRef;} //not heap based
- // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode) {return E_NOTIMPL;} + // *** IOleWindow methods *** + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode) {return E_NOTIMPL;}
// *** ICommDlgBrowser methods *** - virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand(IShellView* ppshv); + virtual HRESULT STDMETHODCALLTYPE OnDefaultCommand(IShellView* ppshv);
- virtual HRESULT STDMETHODCALLTYPE OnStateChange(IShellView* ppshv, ULONG uChange) + virtual HRESULT STDMETHODCALLTYPE OnStateChange(IShellView* ppshv, ULONG uChange) { //handle selection, rename, focus if needed return E_NOTIMPL; }
- virtual HRESULT STDMETHODCALLTYPE IncludeObject(IShellView* ppshv, LPCITEMIDLIST pidl) + virtual HRESULT STDMETHODCALLTYPE IncludeObject(IShellView* ppshv, LPCITEMIDLIST pidl) { //filter files if needed return S_OK; }
- // *** IShellBrowser methods *** (same as IOleInPlaceFrame) - virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) {return E_NOTIMPL;} - virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject) {return E_NOTIMPL;} - virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared) {return E_NOTIMPL;} - virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR lpszStatusText) {return E_NOTIMPL;} - virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable) {return E_NOTIMPL;} + // *** IShellBrowser methods *** (same as IOleInPlaceFrame) + virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) {return E_NOTIMPL;} + virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject) {return E_NOTIMPL;} + virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared) {return E_NOTIMPL;} + virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR lpszStatusText) {return E_NOTIMPL;} + virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable) {return E_NOTIMPL;} virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags) {return E_NOTIMPL;} virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, LPSTREAM* ppStrm) {return E_NOTIMPL;} virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(IShellView* ppshv) {return E_NOTIMPL;} virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) {return E_NOTIMPL;} virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(LPMSG lpmsg, WORD wID) {return S_OK;}
- // IServiceProvider + // IServiceProvider virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void** ppvObject);
- // IOleCommandTarget - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT* pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + // IOleCommandTarget + virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT* pCmdText); + virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
protected: DWORD _dwRef;