On 13.11.2017 22:57, Alexandre Julliard wrote:
Jacek Caban jacek@codeweavers.com writes:
+static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret) +{
- RemSTGMEDIUM *rem_stgmed;
- IStream *stream = NULL;
- ULONG size = 0;
- HRESULT hres;
- if((stgmed->tymed == TYMED_ISTREAM && stgmed->u.pstm) || stgmed->pUnkForRelease) {
hres = CreateStreamOnHGlobal(NULL, TRUE, &stream);
if(FAILED(hres))
return hres;
- }
- switch(stgmed->tymed) {
- case TYMED_NULL:
break;
- case TYMED_ISTREAM:
if(stgmed->u.pstm)
hres = CoMarshalInterface(stream, &IID_IStream, (IUnknown*)stgmed->u.pstm,
MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
break;
- default:
FIXME("unsupported tymed %u\n", stgmed->tymed);
break;
- }
- if(SUCCEEDED(hres) && stgmed->pUnkForRelease)
hres = CoMarshalInterface(stream, &IID_IUnknown, stgmed->pUnkForRelease,
MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
This is causing a warning, and it's not clear to me what would be the correct default value for hres.
Indeed, I wonder why my GCC didn't catch it. I sent a fixed version.
Thanks, Jacek