Commit 7e9913f4 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Fixed some warnings.

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