eliminate GCC4 warnings (patch by Thomas Weidenmueller)

svn path=/trunk/; revision=15224
This commit is contained in:
Martin Fuchs 2005-05-11 19:08:36 +00:00
parent 4358dbd01a
commit 267f11a8b4
5 changed files with 52 additions and 27 deletions

View file

@ -524,10 +524,10 @@ static char remcomOutBuffer[BUFMAX];
/* 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 @@ getpacket (void)
/* send the packet in buffer. */
void
putpacket (unsigned char *buffer)
putpacket (char *buffer)
{
unsigned char checksum;
int count;

View file

@ -50,6 +50,7 @@ struct ShellPathInfo
struct BrowserCallback
{
virtual ~BrowserCallback() {}
virtual void entry_selected(Entry* entry) = 0;
};

View file

@ -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 @@ 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,

View file

@ -52,10 +52,12 @@ class EnumFormatEtcImpl : public IEnumFORMATETC
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(

View file

@ -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 @@ struct IShellBrowserImpl
{
}
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;