Fixes for missing prototypes warnings.

This commit is contained in:
Eric Pouech 2006-02-06 13:13:28 +01:00 committed by Alexandre Julliard
parent 3c0e5eed83
commit e66e227dbe
23 changed files with 42 additions and 47 deletions

View File

@ -35,7 +35,7 @@ static HRESULT (WINAPI *pAdvInstallFile)(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,DWORD,
CHAR CURR_DIR[MAX_PATH]; CHAR CURR_DIR[MAX_PATH];
static void init_function_pointers() static void init_function_pointers(void)
{ {
hAdvPack = LoadLibraryA("advpack.dll"); hAdvPack = LoadLibraryA("advpack.dll");
@ -59,7 +59,7 @@ static void createTestFile(const CHAR *name)
CloseHandle(file); CloseHandle(file);
} }
static void create_test_files() static void create_test_files(void)
{ {
int len; int len;
@ -77,7 +77,7 @@ static void create_test_files()
CreateDirectoryA("dest", NULL); CreateDirectoryA("dest", NULL);
} }
static void delete_test_files() static void delete_test_files(void)
{ {
DeleteFileA("a.txt"); DeleteFileA("a.txt");
DeleteFileA("b.txt"); DeleteFileA("b.txt");
@ -262,7 +262,7 @@ static void set_cab_parameters(PCCAB pCabParams)
lstrcpyA(pCabParams->szCab, "extract.cab"); lstrcpyA(pCabParams->szCab, "extract.cab");
} }
static void create_cab_file() static void create_cab_file(void)
{ {
CCAB cabParams; CCAB cabParams;
HFCI hfci; HFCI hfci;
@ -289,7 +289,7 @@ static void create_cab_file()
ok(res, "Failed to destroy the cabinet\n"); ok(res, "Failed to destroy the cabinet\n");
} }
static void test_ExtractFiles() static void test_ExtractFiles(void)
{ {
HRESULT hr; HRESULT hr;
char destFolder[MAX_PATH]; char destFolder[MAX_PATH];

View File

@ -58,7 +58,7 @@ static HRESULT (WINAPI *pExtract)(EXTRACTDEST*, LPCSTR);
CHAR CURR_DIR[MAX_PATH]; CHAR CURR_DIR[MAX_PATH];
static void init_function_pointers() static void init_function_pointers(void)
{ {
hCabinet = LoadLibraryA("cabinet.dll"); hCabinet = LoadLibraryA("cabinet.dll");
@ -81,7 +81,7 @@ static void createTestFile(const CHAR *name)
CloseHandle(file); CloseHandle(file);
} }
static void create_test_files() static void create_test_files(void)
{ {
int len; int len;
@ -99,7 +99,7 @@ static void create_test_files()
CreateDirectoryA("dest", NULL); CreateDirectoryA("dest", NULL);
} }
static void delete_test_files() static void delete_test_files(void)
{ {
DeleteFileA("a.txt"); DeleteFileA("a.txt");
DeleteFileA("b.txt"); DeleteFileA("b.txt");
@ -283,7 +283,7 @@ static void set_cab_parameters(PCCAB pCabParams)
lstrcpyA(pCabParams->szCab, "extract.cab"); lstrcpyA(pCabParams->szCab, "extract.cab");
} }
static void create_cab_file() static void create_cab_file(void)
{ {
CCAB cabParams; CCAB cabParams;
HFCI hfci; HFCI hfci;
@ -310,7 +310,7 @@ static void create_cab_file()
ok(res, "Failed to destroy the cabinet\n"); ok(res, "Failed to destroy the cabinet\n");
} }
static void test_Extract() static void test_Extract(void)
{ {
EXTRACTDEST extractDest; EXTRACTDEST extractDest;
HRESULT res; HRESULT res;

View File

@ -68,7 +68,7 @@ static LONG getItem(HWND cbex, int idx, COMBOBOXEXITEM *cbItem) {
return (LONG)SendMessage(cbex, CBEM_GETITEM, 0, (LPARAM)cbItem); return (LONG)SendMessage(cbex, CBEM_GETITEM, 0, (LPARAM)cbItem);
} }
static void test_comboboxex() { static void test_comboboxex(void) {
HWND myHwnd = 0; HWND myHwnd = 0;
LONG res = -1; LONG res = -1;
COMBOBOXEXITEM cbexItem; COMBOBOXEXITEM cbexItem;

View File

@ -439,8 +439,6 @@ typedef struct _ScanLineListBlock {
} \ } \
} }
typedef void (*voidProcp)();
/* Note the parameter order is different from the X11 equivalents */ /* Note the parameter order is different from the X11 equivalents */
static void REGION_CopyRegion(WINEREGION *d, WINEREGION *s); static void REGION_CopyRegion(WINEREGION *d, WINEREGION *s);
@ -1563,9 +1561,9 @@ static void REGION_RegionOp(
WINEREGION *newReg, /* Place to store result */ WINEREGION *newReg, /* Place to store result */
WINEREGION *reg1, /* First region in operation */ WINEREGION *reg1, /* First region in operation */
WINEREGION *reg2, /* 2nd region in operation */ WINEREGION *reg2, /* 2nd region in operation */
void (*overlapFunc)(), /* Function to call for over-lapping bands */ void (*overlapFunc)(WINEREGION*, RECT*, RECT*, RECT*, RECT*, INT, INT), /* Function to call for over-lapping bands */
void (*nonOverlap1Func)(), /* Function to call for non-overlapping bands in region 1 */ void (*nonOverlap1Func)(WINEREGION*, RECT*, RECT*, INT, INT), /* Function to call for non-overlapping bands in region 1 */
void (*nonOverlap2Func)() /* Function to call for non-overlapping bands in region 2 */ void (*nonOverlap2Func)(WINEREGION*, RECT*, RECT*, INT, INT) /* Function to call for non-overlapping bands in region 2 */
) { ) {
RECT *r1; /* Pointer into first region */ RECT *r1; /* Pointer into first region */
RECT *r2; /* Pointer into 2d region */ RECT *r2; /* Pointer into 2d region */
@ -1909,8 +1907,7 @@ static void REGION_IntersectRegion(WINEREGION *newReg, WINEREGION *reg1,
(!EXTENTCHECK(&reg1->extents, &reg2->extents))) (!EXTENTCHECK(&reg1->extents, &reg2->extents)))
newReg->numRects = 0; newReg->numRects = 0;
else else
REGION_RegionOp (newReg, reg1, reg2, REGION_RegionOp (newReg, reg1, reg2, REGION_IntersectO, NULL, NULL);
(voidProcp) REGION_IntersectO, (voidProcp) NULL, (voidProcp) NULL);
/* /*
* Can't alter newReg's extents before we call miRegionOp because * Can't alter newReg's extents before we call miRegionOp because
@ -2088,8 +2085,7 @@ static void REGION_UnionRegion(WINEREGION *newReg, WINEREGION *reg1,
return; return;
} }
REGION_RegionOp (newReg, reg1, reg2, (voidProcp) REGION_UnionO, REGION_RegionOp (newReg, reg1, reg2, REGION_UnionO, REGION_UnionNonO, REGION_UnionNonO);
(voidProcp) REGION_UnionNonO, (voidProcp) REGION_UnionNonO);
newReg->extents.left = min(reg1->extents.left, reg2->extents.left); newReg->extents.left = min(reg1->extents.left, reg2->extents.left);
newReg->extents.top = min(reg1->extents.top, reg2->extents.top); newReg->extents.top = min(reg1->extents.top, reg2->extents.top);
@ -2288,8 +2284,7 @@ static void REGION_SubtractRegion(WINEREGION *regD, WINEREGION *regM,
return; return;
} }
REGION_RegionOp (regD, regM, regS, (voidProcp) REGION_SubtractO, REGION_RegionOp (regD, regM, regS, REGION_SubtractO, REGION_SubtractNonO1, NULL);
(voidProcp) REGION_SubtractNonO1, (voidProcp) NULL);
/* /*
* Can't alter newReg's extents before we call miRegionOp because * Can't alter newReg's extents before we call miRegionOp because

View File

@ -241,7 +241,7 @@ static void set_profile(void)
nsIProfile_Release(profile); nsIProfile_Release(profile);
} }
static BOOL load_gecko() static BOOL load_gecko(void)
{ {
nsresult nsres; nsresult nsres;
nsIObserver *pStartNotif; nsIObserver *pStartNotif;

View File

@ -182,7 +182,7 @@ static void* do_call_func2(void *func, void *_this, void* arg)
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y) #define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y)
#define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y) #define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y)
static void InitFunctionPtrs() static void InitFunctionPtrs(void)
{ {
hMsvcrt = LoadLibraryA("msvcrt.dll"); hMsvcrt = LoadLibraryA("msvcrt.dll");
ok(hMsvcrt != 0, "LoadLibraryA failed\n"); ok(hMsvcrt != 0, "LoadLibraryA failed\n");

View File

@ -31,7 +31,7 @@
#include <process.h> #include <process.h>
#include <errno.h> #include <errno.h>
void test_fullpath() void test_fullpath(void)
{ {
char full[MAX_PATH]; char full[MAX_PATH];
char tmppath[MAX_PATH]; char tmppath[MAX_PATH];

View File

@ -75,7 +75,7 @@ static void test_swab( void ) {
ok(memcmp(to,expected3,testsize) == 0, "Testing small size %d returned '%*.*s'\n", testsize, testsize, testsize, to); ok(memcmp(to,expected3,testsize) == 0, "Testing small size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
} }
void test_ismbblead() void test_ismbblead(void)
{ {
unsigned int s = '\354'; unsigned int s = '\354';

View File

@ -132,7 +132,7 @@ int _CrtDbgReport(int reportType, const char *filename, int linenumber,
/********************************************************************* /*********************************************************************
* _CrtDumpMemoryLeaks (MSVCRTD.@) * _CrtDumpMemoryLeaks (MSVCRTD.@)
*/ */
int _CrtDumpMemoryLeaks() int _CrtDumpMemoryLeaks(void)
{ {
return 0; return 0;
} }
@ -140,7 +140,7 @@ int _CrtDumpMemoryLeaks()
/********************************************************************* /*********************************************************************
* _CrtCheckMemory (MSVCRTD.@) * _CrtCheckMemory (MSVCRTD.@)
*/ */
int _CrtCheckMemory() int _CrtCheckMemory(void)
{ {
/* Note: maybe we could call here our heap validating functions ? */ /* Note: maybe we could call here our heap validating functions ? */
return TRUE; return TRUE;

View File

@ -2157,7 +2157,7 @@ void __wine_process_init( int argc, char *argv[] )
WINE_MODREF *wm; WINE_MODREF *wm;
NTSTATUS status; NTSTATUS status;
ANSI_STRING func_name; ANSI_STRING func_name;
void (* DECLSPEC_NORETURN init_func)(); void (* DECLSPEC_NORETURN init_func)(void);
extern mode_t FILE_umask; extern mode_t FILE_umask;
thread_init(); thread_init();

View File

@ -43,7 +43,7 @@ static inline int IsLeapYear(int Year)
/* start time of the tests */ /* start time of the tests */
TIME_FIELDS tftest = {1889,12,31,23,59,59,0,0}; TIME_FIELDS tftest = {1889,12,31,23,59,59,0,0};
static void test_pRtlTimeToTimeFields() static void test_pRtlTimeToTimeFields(void)
{ {
LARGE_INTEGER litime , liresult; LARGE_INTEGER litime , liresult;
TIME_FIELDS tfresult; TIME_FIELDS tfresult;

View File

@ -156,7 +156,7 @@ static PROXYHANDLE gProxyHandle;
} \ } \
} }
SQLRETURN SQLDummyFunc() SQLRETURN SQLDummyFunc(void)
{ {
TRACE("SQLDummyFunc:\n"); TRACE("SQLDummyFunc:\n");
return SQL_SUCCESS; return SQL_SUCCESS;

View File

@ -27,7 +27,7 @@
#include "dshow.h" #include "dshow.h"
#include "control.h" #include "control.h"
static void CommitDecommitTest() static void CommitDecommitTest(void)
{ {
IMemAllocator* pMemAllocator; IMemAllocator* pMemAllocator;
HRESULT hr; HRESULT hr;

View File

@ -157,7 +157,7 @@ static void unregister_keys(HKEY hRootKey, const struct registry_key *keys, unsi
} }
} }
static void test_ShortcutFolder() { static void test_ShortcutFolder(void) {
LPSHELLFOLDER pDesktopFolder, pWineTestFolder; LPSHELLFOLDER pDesktopFolder, pWineTestFolder;
IPersistFolder3 *pWineTestPersistFolder; IPersistFolder3 *pWineTestPersistFolder;
LPITEMIDLIST pidlWineTestFolder, pidlCurFolder; LPITEMIDLIST pidlWineTestFolder, pidlCurFolder;

View File

@ -1972,7 +1972,7 @@ HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID)
* RETURNS * RETURNS
* The color depth of the primary display. * The color depth of the primary display.
*/ */
DWORD WINAPI SHGetCurColorRes() DWORD WINAPI SHGetCurColorRes(void)
{ {
HDC hdc; HDC hdc;
DWORD ret; DWORD ret;
@ -2813,7 +2813,7 @@ BOOL WINAPI GUIDFromStringW(LPCWSTR idstr, CLSID *id)
* either set to TRUE, or removed depending on whether the browser is deemed * either set to TRUE, or removed depending on whether the browser is deemed
* to be integrated. * to be integrated.
*/ */
DWORD WINAPI WhichPlatform() DWORD WINAPI WhichPlatform(void)
{ {
static LPCSTR szIntegratedBrowser = "IntegratedBrowser"; static LPCSTR szIntegratedBrowser = "IntegratedBrowser";
static DWORD dwState = 0; static DWORD dwState = 0;
@ -3396,7 +3396,7 @@ HICON WINAPI ExtractIconWrapW(HINSTANCE hInstance, LPCWSTR lpszExeFileName,
/************************************************************************* /*************************************************************************
* @ [SHLWAPI.376] * @ [SHLWAPI.376]
*/ */
LANGID WINAPI MLGetUILanguage() LANGID WINAPI MLGetUILanguage(void)
{ {
FIXME("() stub\n"); FIXME("() stub\n");
/* FIXME: This should be a forward in the .spec file to the win2k function /* FIXME: This should be a forward in the .spec file to the win2k function

View File

@ -55,7 +55,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
* NOTES * NOTES
* If this function returns 0, no further StopWatch functions should be called. * If this function returns 0, no further StopWatch functions should be called.
*/ */
DWORD WINAPI StopWatchMode() DWORD WINAPI StopWatchMode(void)
{ {
FIXME("() stub!\n"); FIXME("() stub!\n");
return 0; return 0;
@ -72,7 +72,7 @@ DWORD WINAPI StopWatchMode()
* RETURNS * RETURNS
* Nothing. * Nothing.
*/ */
void WINAPI StopWatchFlush() void WINAPI StopWatchFlush(void)
{ {
FIXME("() stub!\n"); FIXME("() stub!\n");
} }
@ -188,7 +188,7 @@ void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserve
* RETURNS * RETURNS
* The low 32 bits of the current performance counter reading. * The low 32 bits of the current performance counter reading.
*/ */
DWORD WINAPI GetPerfTime() DWORD WINAPI GetPerfTime(void)
{ {
static LONG64 iCounterFreq = 0; static LONG64 iCounterFreq = 0;
LARGE_INTEGER iCounter; LARGE_INTEGER iCounter;

View File

@ -487,7 +487,7 @@ if( !stop) {\
#define ER 0 #define ER 0
static void test_menu_iteminfo( ) static void test_menu_iteminfo( void )
{ {
int S=sizeof( MENUITEMINFOA); int S=sizeof( MENUITEMINFOA);
int ansi = TRUE; int ansi = TRUE;

View File

@ -182,7 +182,7 @@ static void strfmt( char *str, char *strout)
} \ } \
static void test_TabbedText() static void test_TabbedText(void)
{ {
HWND hwnd; HWND hwnd;
HDC hdc; HDC hdc;

View File

@ -838,7 +838,7 @@ static void fill_url_components(LPURL_COMPONENTS lpUrlComponents)
lpUrlComponents->dwExtraInfoLength = strlen(lpUrlComponents->lpszExtraInfo); lpUrlComponents->dwExtraInfoLength = strlen(lpUrlComponents->lpszExtraInfo);
} }
static void InternetCreateUrlA_test() static void InternetCreateUrlA_test(void)
{ {
URL_COMPONENTS urlComp; URL_COMPONENTS urlComp;
LPSTR szUrl; LPSTR szUrl;

View File

@ -81,10 +81,10 @@ extern int _crtAssertBusy;
extern int _crtBreakAlloc; extern int _crtBreakAlloc;
extern int _crtDbgFlag; extern int _crtDbgFlag;
int _CrtCheckMemory(); int _CrtCheckMemory(void);
int _CrtDbgReport(int reportType, const char *filename, int linenumber, int _CrtDbgReport(int reportType, const char *filename, int linenumber,
const char *moduleName, const char *format, ...); const char *moduleName, const char *format, ...);
int _CrtDumpMemoryLeaks(); int _CrtDumpMemoryLeaks(void);
int _CrtSetBreakAlloc(int new); int _CrtSetBreakAlloc(int new);
int _CrtSetDbgFlag(int new); int _CrtSetDbgFlag(int new);
void *_CrtSetDumpClient(void *dumpClient); void *_CrtSetDumpClient(void *dumpClient);

View File

@ -564,7 +564,7 @@ strong_alias(__pthread_kill_other_threads_np, pthread_kill_other_threads_np);
static pthread_mutex_t atfork_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t atfork_mutex = PTHREAD_MUTEX_INITIALIZER;
typedef void (*atfork_handler)(); typedef void (*atfork_handler)(void);
static atfork_handler atfork_prepare[MAX_ATFORK]; static atfork_handler atfork_prepare[MAX_ATFORK];
static atfork_handler atfork_parent[MAX_ATFORK]; static atfork_handler atfork_parent[MAX_ATFORK];
static atfork_handler atfork_child[MAX_ATFORK]; static atfork_handler atfork_child[MAX_ATFORK];

View File

@ -153,7 +153,7 @@ struct wld_link_map {
* build the preloader with "-nostartfiles -nodefaultlibs", we have to * build the preloader with "-nostartfiles -nodefaultlibs", we have to
* provide our own (empty) version, otherwise linker fails. * provide our own (empty) version, otherwise linker fails.
*/ */
void __bb_init_func() { return; } void __bb_init_func(void) { return; }
/* similar to the above but for -fstack-protector */ /* similar to the above but for -fstack-protector */
void *__stack_chk_guard = 0; void *__stack_chk_guard = 0;

View File

@ -53,7 +53,7 @@ VOID SetFileName(LPCWSTR szFileName)
* *
* Initialize font for the edit window * Initialize font for the edit window
*/ */
static VOID NOTEPAD_InitFont() static VOID NOTEPAD_InitFont(void)
{ {
LOGFONT *lf = &Globals.lfFont; LOGFONT *lf = &Globals.lfFont;
static const WCHAR systemW[] = { 'S','y','s','t','e','m',0 }; static const WCHAR systemW[] = { 'S','y','s','t','e','m',0 };