Fixed some warnings.
This commit is contained in:
parent
51044b3d51
commit
7e9913f463
|
@ -10,6 +10,7 @@
|
|||
#include "wine/obj_moniker.h"
|
||||
#include "debugtools.h"
|
||||
#include "heap.h"
|
||||
#include "ole2.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(ole)
|
||||
|
||||
|
@ -498,7 +499,7 @@ HRESULT MkParseDisplayName( LPBC pbc, LPCOLESTR szUserName,
|
|||
LPDWORD pchEaten, LPMONIKER *ppmk)
|
||||
{
|
||||
FIXME("(%p, %s, %p, %p): stub.\n", pbc, debugstr_w(szUserName), pchEaten, *ppmk);
|
||||
if (!(IsValidInterface(pbc)))
|
||||
if (!(IsValidInterface((LPUNKNOWN) pbc)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
return MK_E_SYNTAX;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "winbase.h" /* for lstrlenW() and the likes */
|
||||
|
@ -6223,7 +6224,7 @@ void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD n
|
|||
/* Create a temp File */
|
||||
GetTempPathW(MAX_PATH, wstrTempDir);
|
||||
GetTempFileNameW(wstrTempDir, wstrPrefix, 0, wstrTempFile);
|
||||
hFile = CreateFileW(wstrTempFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
hFile = CreateFileW(wstrTempFile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
|
||||
if(hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -6235,7 +6236,7 @@ void OLECONVERT_GetOLE20FromOLE10(LPSTORAGE pDestStorage, BYTE *pBuffer, DWORD n
|
|||
hRes = StgOpenStorage(wstrTempFile, NULL, STGM_READ, NULL, 0, &pTempStorage);
|
||||
if(hRes == S_OK)
|
||||
{
|
||||
hRes = StorageImpl_CopyTo(pTempStorage, NULL,NULL,NULL, pDestStorage);
|
||||
hRes = StorageImpl_CopyTo(pTempStorage, 0, NULL, NULL, pDestStorage);
|
||||
StorageBaseImpl_Release(pTempStorage);
|
||||
}
|
||||
DeleteFileW(wstrTempFile);
|
||||
|
@ -6275,16 +6276,16 @@ DWORD OLECONVERT_WriteOLE20ToBuffer(LPSTORAGE pStorage, BYTE **pData)
|
|||
/* Create temp Storage */
|
||||
GetTempPathW(MAX_PATH, wstrTempDir);
|
||||
GetTempFileNameW(wstrTempDir, wstrPrefix, 0, wstrTempFile);
|
||||
hRes = StgCreateDocfile(wstrTempFile, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, NULL, &pTempStorage);
|
||||
hRes = StgCreateDocfile(wstrTempFile, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, &pTempStorage);
|
||||
|
||||
if(hRes == S_OK)
|
||||
{
|
||||
/* Copy Src Storage to the Temp Storage */
|
||||
StorageImpl_CopyTo(pStorage, NULL,NULL,NULL, pTempStorage);
|
||||
StorageImpl_CopyTo(pStorage, 0, NULL, NULL, pTempStorage);
|
||||
StorageBaseImpl_Release(pTempStorage);
|
||||
|
||||
/* Open Temp Storage as a file and copy to memory */
|
||||
hFile = CreateFileW(wstrTempFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
hFile = CreateFileW(wstrTempFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if(hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
nDataLength = GetFileSize(hFile, NULL);
|
||||
|
|
|
@ -106,6 +106,7 @@ HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid,
|
|||
HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
|
||||
HRESULT WINAPI OleInitialize(LPVOID pvReserved);
|
||||
void WINAPI OleUninitialize(void);
|
||||
BOOL WINAPI IsValidInterface(LPUNKNOWN punk);
|
||||
|
||||
/*
|
||||
* OLE version conversion declarations
|
||||
|
|
|
@ -152,6 +152,11 @@ BOOL WINAPI PathIsUNCW(LPCWSTR str);
|
|||
#define PathIsUNC WINELIB_NAME_AW(PathIsUNC)
|
||||
BOOL WINAPI PathIsUNCAW(LPCVOID str);
|
||||
|
||||
BOOL WINAPI PathIsURLA(LPCSTR str);
|
||||
BOOL WINAPI PathIsURLW(LPCWSTR str);
|
||||
#define PathIsURL WINELIB_NAME_AW(PathIsURL)
|
||||
BOOL WINAPI PathIsURLAW(LPCVOID str);
|
||||
|
||||
BOOL WINAPI PathFindOnPathA(LPSTR sFile, LPCSTR sOtherDirs);
|
||||
BOOL WINAPI PathFindOnPathW(LPWSTR sFile, LPCWSTR sOtherDirs);
|
||||
#define PathFindOnPath WINELIB_NAME_AW(PathFindOnPath)
|
||||
|
|
|
@ -1461,7 +1461,9 @@ VOID WINAPI GlobalMemoryStatus(
|
|||
) {
|
||||
static MEMORYSTATUS cached_memstatus;
|
||||
static int cache_lastchecked = 0;
|
||||
#ifdef linux
|
||||
FILE *f;
|
||||
#endif
|
||||
|
||||
if (time(NULL)==cache_lastchecked) {
|
||||
memcpy(lpmem,&cached_memstatus,sizeof(MEMORYSTATUS));
|
||||
|
|
|
@ -1292,7 +1292,7 @@ static int NativeRegLoadKey( HKEY hkey, char* fn, int level )
|
|||
regf = base;
|
||||
|
||||
/* hbin block */
|
||||
hbin = (char *) base + 0x1000;
|
||||
hbin = (nt_hbin *) ((char *) base + 0x1000);
|
||||
if (hbin->id != NT_REG_POOL_BLOCK_ID)
|
||||
{
|
||||
ERR_(reg)( "%s hbin block invalid\n", fn);
|
||||
|
|
|
@ -462,6 +462,7 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
|
|||
LPWSTR p = buffer;
|
||||
UINT i, len;
|
||||
CHAR number[20];
|
||||
WPRINTF_DATA argData;
|
||||
|
||||
while (*spec && (maxlen > 1))
|
||||
{
|
||||
|
@ -469,7 +470,8 @@ INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec,
|
|||
spec++;
|
||||
if (*spec == '%') { *p++ = *spec++; maxlen--; continue; }
|
||||
spec += WPRINTF_ParseFormatW( spec, &format );
|
||||
len = WPRINTF_GetLen( &format, args, number, maxlen - 1 );
|
||||
argData = WPRINTF_ExtractVAPtr( &format, &args );
|
||||
len = WPRINTF_GetLen( &format, &argData, number, maxlen - 1 );
|
||||
if (!(format.flags & WPRINTF_LEFTALIGN))
|
||||
for (i = format.precision; i < format.width; i++, maxlen--)
|
||||
*p++ = ' ';
|
||||
|
|
|
@ -857,7 +857,7 @@ static struct key *create_root_key( int hkey )
|
|||
if (pwd) p = pwd->pw_name;
|
||||
else
|
||||
{
|
||||
sprintf( buffer, "%d", getuid() );
|
||||
sprintf( buffer, "%ld", (long) getuid() );
|
||||
p = buffer;
|
||||
}
|
||||
len = strlen(p);
|
||||
|
|
|
@ -274,7 +274,7 @@ static void master_socket_poll_event( struct object *obj, int event )
|
|||
{
|
||||
struct sockaddr_un dummy;
|
||||
int len = sizeof(dummy);
|
||||
int client = accept( master_socket->obj.fd, &dummy, &len );
|
||||
int client = accept( master_socket->obj.fd, (struct sockaddr *) &dummy, &len );
|
||||
if (client != -1) create_process( client, NULL, NULL, "", 1 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue