From f0280cbd1e641df54e865c9860d428f564afae8f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 10 Dec 2006 16:51:26 +0100 Subject: [PATCH] made functions and variables static in some testcases. --- dlls/crypt32/tests/cert.c | 4 +-- dlls/ddraw/tests/refcount.c | 2 +- dlls/dinput/tests/dinput_test.h | 1 - dlls/dinput/tests/joystick.c | 2 +- dlls/dsound/tests/capture.c | 2 +- dlls/dsound/tests/dsound_test.h | 1 - dlls/dsound/tests/propset.c | 8 ++--- dlls/gdi32/tests/bitmap.c | 4 +-- dlls/gdi32/tests/mapping.c | 8 ++--- dlls/gdi32/tests/metafile.c | 4 +-- dlls/msi/tests/db.c | 2 +- dlls/msvcrt/tests/data.c | 4 +-- dlls/msvcrt/tests/dir.c | 2 +- dlls/msvcrt/tests/string.c | 2 +- dlls/msxml3/tests/domdoc.c | 4 +-- dlls/ole32/tests/ole2.c | 50 ++++++++++++++++---------------- dlls/oleaut32/tests/olefont.c | 8 ++--- dlls/oleaut32/tests/safearray.c | 2 +- dlls/oleaut32/tests/vartype.c | 9 ------ dlls/rpcrt4/tests/cstub.c | 38 ++++++++++++------------ dlls/rpcrt4/tests/ndr_marshall.c | 4 +-- dlls/secur32/tests/main.c | 2 +- dlls/shell32/tests/shlfolder.c | 6 ++-- dlls/user32/tests/dde.c | 2 +- dlls/user32/tests/edit.c | 4 +-- dlls/user32/tests/menu.c | 20 ++++++------- dlls/user32/tests/sysparams.c | 6 ++-- dlls/user32/tests/win.c | 4 +-- 28 files changed, 97 insertions(+), 108 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index f3d7427f64d..92b733bcaa9 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -1553,7 +1553,7 @@ static const BYTE int5[] = { 0x7f }; static const BYTE int6[] = { 0x80, 0x00, 0x00, 0x00 }; static const BYTE int7[] = { 0x80, 0x00 }; -struct IntBlobTest +static struct IntBlobTest { CRYPT_INTEGER_BLOB blob1; CRYPT_INTEGER_BLOB blob2; @@ -1662,7 +1662,7 @@ static void testHashPublicKeyInfo(void) } } -void testCompareCert(void) +static void testCompareCert(void) { CERT_INFO info1 = { 0 }, info2 = { 0 }; BOOL ret; diff --git a/dlls/ddraw/tests/refcount.c b/dlls/ddraw/tests/refcount.c index 2c2c994c0c5..b79612f9558 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c @@ -37,7 +37,7 @@ static void init_function_pointers(void) } } -unsigned long getRefcount(IUnknown *iface) +static unsigned long getRefcount(IUnknown *iface) { IUnknown_AddRef(iface); return IUnknown_Release(iface); diff --git a/dlls/dinput/tests/dinput_test.h b/dlls/dinput/tests/dinput_test.h index 1a40f7b58b9..9a9af6c32cd 100644 --- a/dlls/dinput/tests/dinput_test.h +++ b/dlls/dinput/tests/dinput_test.h @@ -16,5 +16,4 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -extern HWND get_hwnd(void); extern const char * get_file_version(const char * file_name); diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 5228a6fac3f..df12529d433 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -67,7 +67,7 @@ static const DIDATAFORMAT c_dfDIJoystickTest = { (LPDIOBJECTDATAFORMAT)dfDIJoystickTest }; -HWND get_hwnd(void) +static HWND get_hwnd(void) { HWND hwnd=GetForegroundWindow(); if (!hwnd) diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c index 391d17fc180..23b40956635 100644 --- a/dlls/dsound/tests/capture.c +++ b/dlls/dsound/tests/capture.c @@ -36,7 +36,7 @@ static HRESULT (WINAPI *pDirectSoundCaptureCreate)(LPCGUID,LPDIRECTSOUNDCAPTURE*,LPUNKNOWN)=NULL; static HRESULT (WINAPI *pDirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA,LPVOID)=NULL; -const char * get_format_str(WORD format) +static const char * get_format_str(WORD format) { static char msg[32]; #define WAVE_FORMAT(f) case f: return #f diff --git a/dlls/dsound/tests/dsound_test.h b/dlls/dsound/tests/dsound_test.h index 756a31a2216..2a948eeacca 100644 --- a/dlls/dsound/tests/dsound_test.h +++ b/dlls/dsound/tests/dsound_test.h @@ -62,5 +62,4 @@ extern void test_buffer8(LPDIRECTSOUND8,LPDIRECTSOUNDBUFFER*, extern const char * getDSBCAPS(DWORD xmask); extern int align(int length, int align); extern const char * get_file_version(const char * file_name); -extern const char * get_format_str(WORD format); extern const char * format_string(const WAVEFORMATEX* wfx); diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c index e4976a3c3fb..28324a84b9a 100644 --- a/dlls/dsound/tests/propset.c +++ b/dlls/dsound/tests/propset.c @@ -60,7 +60,7 @@ static HRESULT (WINAPI *pDirectSoundFullDuplexCreate)(LPCGUID,LPCGUID, LPCDSCBUFFERDESC,LPCDSBUFFERDESC,HWND,DWORD,LPDIRECTSOUNDFULLDUPLEX*, LPDIRECTSOUNDCAPTUREBUFFER8*,LPDIRECTSOUNDBUFFER8*,LPUNKNOWN)=NULL; -BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, +static BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, LPVOID context) { trace(" found device:\n"); @@ -86,7 +86,7 @@ BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data, return TRUE; } -BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data, +static BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data, LPVOID context) { char descriptionA[0x100]; @@ -118,7 +118,7 @@ BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data, return TRUE; } -BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data, +static BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data, LPVOID context) { trace(" found device:\n"); @@ -144,7 +144,7 @@ BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data, return TRUE; } -BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, +static BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, LPVOID context) { char descriptionA[0x100]; diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index be4088c7de2..b6485f96554 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -729,9 +729,9 @@ static void test_dibsections(void) DeleteDC(hdcmem); ReleaseDC(0, hdc); -} +} -void test_mono_dibsection(void) +static void test_mono_dibsection(void) { HDC hdc, memdc; HBITMAP old_bm, mono_ds; diff --git a/dlls/gdi32/tests/mapping.c b/dlls/gdi32/tests/mapping.c index 836ecdffbee..695b7d7f95a 100644 --- a/dlls/gdi32/tests/mapping.c +++ b/dlls/gdi32/tests/mapping.c @@ -29,7 +29,7 @@ #include "winerror.h" -void test_modify_world_transform(void) +static void test_modify_world_transform(void) { HDC hdc = GetDC(0); int ret; @@ -53,7 +53,7 @@ void test_modify_world_transform(void) ReleaseDC(0, hdc); } -void test_SetWindowExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) +static void test_SetWindowExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) { SIZE windowExt, viewportExt; POINT windowOrg, windowOrgAfter, viewportOrg, viewportOrgAfter; @@ -83,7 +83,7 @@ void test_SetWindowExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expe viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); } -void test_SetViewportExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) +static void test_SetViewportExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expected_vp_cy) { SIZE windowExt, windowExtAfter, viewportExt; POINT windowOrg, windowOrgAfter, viewportOrg, viewportOrgAfter; @@ -114,7 +114,7 @@ void test_SetViewportExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG ex viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); } -void test_isotropic_mapping(void) +static void test_isotropic_mapping(void) { SIZE win, vp; HDC hdc = GetDC(0); diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index d7e655e8e5e..a5261d33e07 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -304,10 +304,10 @@ static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, } - return 1; + return 1; } -void test_SaveDC(void) +static void test_SaveDC(void) { HDC hdcMetafile, hdcDisplay; HENHMETAFILE hMetafile; diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 83bc8110820..9d6a97bf008 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -3155,7 +3155,7 @@ static void test_update(void) ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n"); } -void test_special_tables(void) +static void test_special_tables(void) { const char *query; MSIHANDLE hdb = 0; diff --git a/dlls/msvcrt/tests/data.c b/dlls/msvcrt/tests/data.c index 74980a294ce..a1378199ec9 100644 --- a/dlls/msvcrt/tests/data.c +++ b/dlls/msvcrt/tests/data.c @@ -36,7 +36,7 @@ static unsigned int (*p_initterm)(_INITTERMFUN *start, _INITTERMFUN *end); static int callbacked; -void initcallback(void) +static void initcallback(void) { callbacked++; } @@ -47,7 +47,7 @@ void initcallback(void) ok(expected == rc, "_initterm: return result mismatch: got %i, expected %i\n", rc, expected); \ ok(expected == callbacked,"_initterm: callbacks count mismatch: got %i, expected %i\n", callbacked, expected); -void test_initterm(void) +static void test_initterm(void) { int i; int rc; diff --git a/dlls/msvcrt/tests/dir.c b/dlls/msvcrt/tests/dir.c index a6fb0e9ea33..dfa49823fd7 100644 --- a/dlls/msvcrt/tests/dir.c +++ b/dlls/msvcrt/tests/dir.c @@ -31,7 +31,7 @@ #include #include -void test_fullpath(void) +static void test_fullpath(void) { char full[MAX_PATH]; char tmppath[MAX_PATH]; diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index c0857a213bf..a86f91e1673 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -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); } -void test_ismbblead(void) +static void test_ismbblead(void) { unsigned int s = '\354'; diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index f082991f9cf..a2824fd7cad 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -99,7 +99,7 @@ static const WCHAR szstr2[] = { 's','t','r','2',0 }; static const WCHAR szstar[] = { '*',0 }; static const WCHAR szfn1_txt[] = {'f','n','1','.','t','x','t',0}; -void test_domdoc( void ) +static void test_domdoc( void ) { HRESULT r; IXMLDOMDocument *doc = NULL; @@ -269,7 +269,7 @@ void test_domdoc( void ) } -void test_domnode( void ) +static void test_domnode( void ) { HRESULT r; IXMLDOMDocument *doc = NULL, *owner = NULL; diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index a2f61c8df67..9d37e0fef18 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -215,7 +215,7 @@ static HRESULT WINAPI OleObject_IsUpToDate return S_OK; } -HRESULT WINAPI OleObject_GetUserClassID +static HRESULT WINAPI OleObject_GetUserClassID ( IOleObject *iface, CLSID *pClsid @@ -225,7 +225,7 @@ HRESULT WINAPI OleObject_GetUserClassID return E_NOTIMPL; } -HRESULT WINAPI OleObject_GetUserType +static HRESULT WINAPI OleObject_GetUserType ( IOleObject *iface, DWORD dwFormOfType, @@ -236,7 +236,7 @@ HRESULT WINAPI OleObject_GetUserType return E_NOTIMPL; } -HRESULT WINAPI OleObject_SetExtent +static HRESULT WINAPI OleObject_SetExtent ( IOleObject *iface, DWORD dwDrawAspect, @@ -247,7 +247,7 @@ HRESULT WINAPI OleObject_SetExtent return S_OK; } -HRESULT WINAPI OleObject_GetExtent +static HRESULT WINAPI OleObject_GetExtent ( IOleObject *iface, DWORD dwDrawAspect, @@ -258,7 +258,7 @@ HRESULT WINAPI OleObject_GetExtent return E_NOTIMPL; } -HRESULT WINAPI OleObject_Advise +static HRESULT WINAPI OleObject_Advise ( IOleObject *iface, IAdviseSink *pAdvSink, @@ -269,7 +269,7 @@ HRESULT WINAPI OleObject_Advise return S_OK; } -HRESULT WINAPI OleObject_Unadvise +static HRESULT WINAPI OleObject_Unadvise ( IOleObject *iface, DWORD dwConnection @@ -279,7 +279,7 @@ HRESULT WINAPI OleObject_Unadvise return S_OK; } -HRESULT WINAPI OleObject_EnumAdvise +static HRESULT WINAPI OleObject_EnumAdvise ( IOleObject *iface, IEnumSTATDATA **ppenumAdvise @@ -289,7 +289,7 @@ HRESULT WINAPI OleObject_EnumAdvise return E_NOTIMPL; } -HRESULT WINAPI OleObject_GetMiscStatus +static HRESULT WINAPI OleObject_GetMiscStatus ( IOleObject *iface, DWORD dwAspect, @@ -301,7 +301,7 @@ HRESULT WINAPI OleObject_GetMiscStatus return S_OK; } -HRESULT WINAPI OleObject_SetColorScheme +static HRESULT WINAPI OleObject_SetColorScheme ( IOleObject *iface, LOGPALETTE *pLogpal @@ -365,7 +365,7 @@ static HRESULT WINAPI OleObjectPersistStg_GetClassId(IPersistStorage *iface, CLS return E_NOTIMPL; } -HRESULT WINAPI OleObjectPersistStg_IsDirty +static HRESULT WINAPI OleObjectPersistStg_IsDirty ( IPersistStorage *iface ) @@ -374,7 +374,7 @@ HRESULT WINAPI OleObjectPersistStg_IsDirty return S_OK; } -HRESULT WINAPI OleObjectPersistStg_InitNew +static HRESULT WINAPI OleObjectPersistStg_InitNew ( IPersistStorage *iface, IStorage *pStg @@ -384,7 +384,7 @@ HRESULT WINAPI OleObjectPersistStg_InitNew return S_OK; } -HRESULT WINAPI OleObjectPersistStg_Load +static HRESULT WINAPI OleObjectPersistStg_Load ( IPersistStorage *iface, IStorage *pStg @@ -394,7 +394,7 @@ HRESULT WINAPI OleObjectPersistStg_Load return S_OK; } -HRESULT WINAPI OleObjectPersistStg_Save +static HRESULT WINAPI OleObjectPersistStg_Save ( IPersistStorage *iface, IStorage *pStgSave, @@ -405,7 +405,7 @@ HRESULT WINAPI OleObjectPersistStg_Save return S_OK; } -HRESULT WINAPI OleObjectPersistStg_SaveCompleted +static HRESULT WINAPI OleObjectPersistStg_SaveCompleted ( IPersistStorage *iface, IStorage *pStgNew @@ -415,7 +415,7 @@ HRESULT WINAPI OleObjectPersistStg_SaveCompleted return S_OK; } -HRESULT WINAPI OleObjectPersistStg_HandsOffStorage +static HRESULT WINAPI OleObjectPersistStg_HandsOffStorage ( IPersistStorage *iface ) @@ -457,7 +457,7 @@ static ULONG WINAPI OleObjectCache_Release(IOleCache *iface) return 1; } -HRESULT WINAPI OleObjectCache_Cache +static HRESULT WINAPI OleObjectCache_Cache ( IOleCache *iface, FORMATETC *pformatetc, @@ -469,7 +469,7 @@ HRESULT WINAPI OleObjectCache_Cache return S_OK; } -HRESULT WINAPI OleObjectCache_Uncache +static HRESULT WINAPI OleObjectCache_Uncache ( IOleCache *iface, DWORD dwConnection @@ -479,7 +479,7 @@ HRESULT WINAPI OleObjectCache_Uncache return S_OK; } -HRESULT WINAPI OleObjectCache_EnumCache +static HRESULT WINAPI OleObjectCache_EnumCache ( IOleCache *iface, IEnumSTATDATA **ppenumSTATDATA @@ -490,7 +490,7 @@ HRESULT WINAPI OleObjectCache_EnumCache } -HRESULT WINAPI OleObjectCache_InitCache +static HRESULT WINAPI OleObjectCache_InitCache ( IOleCache *iface, IDataObject *pDataObject @@ -501,7 +501,7 @@ HRESULT WINAPI OleObjectCache_InitCache } -HRESULT WINAPI OleObjectCache_SetData +static HRESULT WINAPI OleObjectCache_SetData ( IOleCache *iface, FORMATETC *pformatetc, @@ -588,7 +588,7 @@ static ULONG WINAPI OleObjectRunnable_Release(IRunnableObject *iface) return 1; } -HRESULT WINAPI OleObjectRunnable_GetRunningClass( +static HRESULT WINAPI OleObjectRunnable_GetRunningClass( IRunnableObject *iface, LPCLSID lpClsid) { @@ -596,7 +596,7 @@ HRESULT WINAPI OleObjectRunnable_GetRunningClass( return E_NOTIMPL; } -HRESULT WINAPI OleObjectRunnable_Run( +static HRESULT WINAPI OleObjectRunnable_Run( IRunnableObject *iface, LPBINDCTX pbc) { @@ -604,13 +604,13 @@ HRESULT WINAPI OleObjectRunnable_Run( return S_OK; } -BOOL WINAPI OleObjectRunnable_IsRunning(IRunnableObject *iface) +static BOOL WINAPI OleObjectRunnable_IsRunning(IRunnableObject *iface) { CHECK_EXPECTED_METHOD("OleObjectRunnable_IsRunning"); return TRUE; } -HRESULT WINAPI OleObjectRunnable_LockRunning( +static HRESULT WINAPI OleObjectRunnable_LockRunning( IRunnableObject *iface, BOOL fLock, BOOL fLastUnlockCloses) @@ -619,7 +619,7 @@ HRESULT WINAPI OleObjectRunnable_LockRunning( return S_OK; } -HRESULT WINAPI OleObjectRunnable_SetContainedObject( +static HRESULT WINAPI OleObjectRunnable_SetContainedObject( IRunnableObject *iface, BOOL fContained) { diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index b3e52515203..5a02502a272 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -114,7 +114,7 @@ static void test_ifont_sizes(long lo_size, long hi_size, IFont_Release(ifnt); } -void test_QueryInterface(void) +static void test_QueryInterface(void) { LPVOID pvObj = NULL; HRESULT hres; @@ -143,7 +143,7 @@ void test_QueryInterface(void) IFont_Release(font); } -void test_type_info(void) +static void test_type_info(void) { LPVOID pvObj = NULL; HRESULT hres; @@ -324,7 +324,7 @@ static void test_font_events_disp(void) IFont_Release(pFont2); } -void test_names_ids(WCHAR* w_name_1, const char* a_name_1, +static void test_names_ids(WCHAR* w_name_1, const char* a_name_1, WCHAR* w_name_2, const char* a_name_2, LCID lcid, DISPID id_1, DISPID id_2, HRESULT hres_expect, int numnames) @@ -362,7 +362,7 @@ void test_names_ids(WCHAR* w_name_1, const char* a_name_1, IFontDisp_Release(fontdisp); } -void test_GetIDsOfNames(void) +static void test_GetIDsOfNames(void) { WCHAR name_Name[] = {'N','a','m','e',0}; WCHAR name_Italic[] = {'I','t','a','l','i','c',0}; diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index f98932b721e..41ee3cbbf47 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -64,7 +64,7 @@ static SAFEARRAY* (WINAPI *pSafeArrayCreateVector)(VARTYPE,LONG,ULONG); /* Have the decimal type? */ #define HAVE_OLEAUT32_DECIMAL HAVE_FUNC(VarDecAdd) /* Have INT_PTR/UINT_PTR type? */ -BOOL HAVE_OLEAUT32_INT_PTR; +static BOOL HAVE_OLEAUT32_INT_PTR; /* very old version? */ #define IS_ANCIENT (!HAVE_FUNC(VarI1FromI2)) diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index 52461991321..b2ec5f94693 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -67,15 +67,6 @@ static HMODULE hOleaut32; #define IS_MODERN_VTYPE(vt) (vt==VT_VARIANT||vt==VT_DECIMAL|| \ vt==VT_I1||vt==VT_UI2||vt==VT_UI4||vt == VT_INT||vt == VT_UINT) -/* Macro for setting typ and initializing */ -/* First some dummy definitions*/ -int val_empty, val_null; - -#define V_EMPTY(x) val_empty -#define V_NULL(x) val_null - -#define VARINIT( A, type, value) V_VT(A) = VT##type; V##type(A) = value - /* Macros for converting and testing results */ #define CONVVARS(typ) HRESULT hres; CONV_TYPE out; typ in diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c index b90c948dadd..9cac380f7a1 100644 --- a/dlls/rpcrt4/tests/cstub.c +++ b/dlls/rpcrt4/tests/cstub.c @@ -112,12 +112,12 @@ static const MIDL_STUB_DESC Object_StubDesc = 0 /* Reserved5 */ }; -HRESULT WINAPI if1_fn1_Proxy(void *This) +static HRESULT WINAPI if1_fn1_Proxy(void *This) { return S_OK; } -void __RPC_STUB if1_fn1_Stub( +static void __RPC_STUB if1_fn1_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, @@ -126,12 +126,12 @@ void __RPC_STUB if1_fn1_Stub( trace("fn1 stub\n"); } -HRESULT WINAPI if1_fn2_Proxy(void *This) +static HRESULT WINAPI if1_fn2_Proxy(void *This) { return S_OK; } -void __RPC_STUB if1_fn2_Stub( +static void __RPC_STUB if1_fn2_Stub( IRpcStubBuffer *This, IRpcChannelBuffer *_pRpcChannelBuffer, PRPC_MESSAGE _pRpcMessage, @@ -140,7 +140,7 @@ void __RPC_STUB if1_fn2_Stub( trace("fn2 stub\n"); } -CINTERFACE_PROXY_VTABLE(5) if1_proxy_vtbl = +static CINTERFACE_PROXY_VTABLE(5) if1_proxy_vtbl = { { &IID_if1 }, { IUnknown_QueryInterface_Proxy, @@ -176,7 +176,7 @@ static const PRPC_STUB_FUNCTION if1_table[] = if1_fn2_Stub }; -CInterfaceStubVtbl if1_stub_vtbl = +static CInterfaceStubVtbl if1_stub_vtbl = { { &IID_if1, @@ -187,7 +187,7 @@ CInterfaceStubVtbl if1_stub_vtbl = { CStdStubBuffer_METHODS } }; -CINTERFACE_PROXY_VTABLE(13) if2_proxy_vtbl = +static CINTERFACE_PROXY_VTABLE(13) if2_proxy_vtbl = { { &IID_if2 }, { IUnknown_QueryInterface_Proxy, @@ -247,7 +247,7 @@ static const PRPC_STUB_FUNCTION if2_table[] = STUB_FORWARDING_FUNCTION }; -CInterfaceStubVtbl if2_stub_vtbl = +static CInterfaceStubVtbl if2_stub_vtbl = { { &IID_if2, @@ -258,7 +258,7 @@ CInterfaceStubVtbl if2_stub_vtbl = { CStdStubBuffer_DELEGATING_METHODS } }; -CINTERFACE_PROXY_VTABLE(4) if3_proxy_vtbl = +static CINTERFACE_PROXY_VTABLE(4) if3_proxy_vtbl = { { &IID_if3 }, { IUnknown_QueryInterface_Proxy, @@ -292,7 +292,7 @@ static const PRPC_STUB_FUNCTION if3_table[] = if1_fn1_Stub }; -CInterfaceStubVtbl if3_stub_vtbl = +static CInterfaceStubVtbl if3_stub_vtbl = { { &IID_if3, @@ -303,7 +303,7 @@ CInterfaceStubVtbl if3_stub_vtbl = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; -CINTERFACE_PROXY_VTABLE(7) if4_proxy_vtbl = +static CINTERFACE_PROXY_VTABLE(7) if4_proxy_vtbl = { { &IID_if4 }, { IUnknown_QueryInterface_Proxy, @@ -345,7 +345,7 @@ static const PRPC_STUB_FUNCTION if4_table[] = STUB_FORWARDING_FUNCTION, }; -CInterfaceStubVtbl if4_stub_vtbl = +static CInterfaceStubVtbl if4_stub_vtbl = { { &IID_if4, @@ -356,7 +356,7 @@ CInterfaceStubVtbl if4_stub_vtbl = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; -const CInterfaceProxyVtbl *cstub_ProxyVtblList[] = +static const CInterfaceProxyVtbl *cstub_ProxyVtblList[] = { (const CInterfaceProxyVtbl *) &if1_proxy_vtbl, (const CInterfaceProxyVtbl *) &if2_proxy_vtbl, @@ -365,7 +365,7 @@ const CInterfaceProxyVtbl *cstub_ProxyVtblList[] = NULL }; -const CInterfaceStubVtbl *cstub_StubVtblList[] = +static const CInterfaceStubVtbl *cstub_StubVtblList[] = { (const CInterfaceStubVtbl *) &if1_stub_vtbl, (const CInterfaceStubVtbl *) &if2_stub_vtbl, @@ -374,7 +374,7 @@ const CInterfaceStubVtbl *cstub_StubVtblList[] = NULL }; -PCInterfaceName const if_name_list[] = +static PCInterfaceName const if_name_list[] = { "if1", "if2", @@ -383,7 +383,7 @@ PCInterfaceName const if_name_list[] = NULL }; -const IID *base_iid_list[] = +static const IID *base_iid_list[] = { NULL, &IID_ITypeLib, @@ -394,7 +394,7 @@ const IID *base_iid_list[] = #define cstub_CHECK_IID(n) IID_GENERIC_CHECK_IID( cstub, pIID, n) -int __stdcall iid_lookup( const IID * pIID, int * pIndex ) +static int __stdcall iid_lookup( const IID * pIID, int * pIndex ) { IID_BS_LOOKUP_SETUP @@ -406,7 +406,7 @@ int __stdcall iid_lookup( const IID * pIID, int * pIndex ) } -const ExtendedProxyFileInfo my_proxy_file_info = +static const ExtendedProxyFileInfo my_proxy_file_info = { (const PCInterfaceProxyVtblList *) &cstub_ProxyVtblList, (const PCInterfaceStubVtblList *) &cstub_StubVtblList, @@ -421,7 +421,7 @@ const ExtendedProxyFileInfo my_proxy_file_info = 0 }; -const ProxyFileInfo *proxy_file_list[] = { +static const ProxyFileInfo *proxy_file_list[] = { &my_proxy_file_info, NULL }; diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 58428c2dcfe..3ed9a32cee0 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -33,13 +33,13 @@ static int my_alloc_called; static int my_free_called; -void * CALLBACK my_alloc(size_t size) +static void * CALLBACK my_alloc(size_t size) { my_alloc_called++; return NdrOleAllocate(size); } -void CALLBACK my_free(void *ptr) +static void CALLBACK my_free(void *ptr) { my_free_called++; NdrOleFree(ptr); diff --git a/dlls/secur32/tests/main.c b/dlls/secur32/tests/main.c index 011b3db3af8..f105eb0c2fa 100644 --- a/dlls/secur32/tests/main.c +++ b/dlls/secur32/tests/main.c @@ -47,7 +47,7 @@ static SECURITY_STATUS (SEC_ENTRY * pFreeCredentialsHandle)(PCredHandle); static SECURITY_STATUS (SEC_ENTRY * pDeleteSecurityContext)(PCtxtHandle); static SECURITY_STATUS (SEC_ENTRY * pQueryContextAttributesA)(PCtxtHandle, ULONG, PVOID); -void InitFunctionPtrs(void) +static void InitFunctionPtrs(void) { secdll = LoadLibraryA("secur32.dll"); if(!secdll) diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 6332d1fe947..b5b8029493f 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -1016,11 +1016,11 @@ static const IPropertyBagVtbl InitPropertyBag_IPropertyBagVtbl = { InitPropertyBag_IPropertyBag_Write }; -struct IPropertyBag InitPropertyBag = { +static struct IPropertyBag InitPropertyBag = { &InitPropertyBag_IPropertyBagVtbl }; -void test_FolderShortcut(void) { +static void test_FolderShortcut(void) { IPersistPropertyBag *pPersistPropertyBag; IShellFolder *pShellFolder, *pDesktopFolder; IPersistFolder3 *pPersistFolder3; @@ -1210,7 +1210,7 @@ struct FileStructW { }; #include "poppack.h" -void test_ITEMIDLIST_format(void) { +static void test_ITEMIDLIST_format(void) { WCHAR wszPersonal[MAX_PATH]; LPSHELLFOLDER psfDesktop, psfPersonal; LPITEMIDLIST pidlPersonal, pidlFile; diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index acba97a86b4..a164dfb86ee 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -34,7 +34,7 @@ static WCHAR exec_cmdW[] = {'u','n','i','c','o','d','e',' ','d','d','e',' ','c', static WNDPROC old_dde_client_wndproc; -LRESULT WINAPI hook_dde_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +static LRESULT WINAPI hook_dde_client_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { UINT_PTR lo, hi; diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 9a82ce85d9b..ee61085c365 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -877,7 +877,7 @@ do { \ edit_pos_ok(test_left, format_rect.left - left_margin, left); \ } while(0) -void test_text_position_style(DWORD style) +static void test_text_position_style(DWORD style) { HWND hwEdit; HFONT font, oldFont; @@ -995,7 +995,7 @@ void test_text_position_style(DWORD style) DestroyWindow(hwEdit); } -void test_text_position(void) +static void test_text_position(void) { trace("EDIT: Text position (Single line)\n"); test_text_position_style(ES_AUTOHSCROLL | ES_AUTOVSCROLL); diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index 3b24553980a..601228abeec 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -86,13 +86,13 @@ static struct { { NULL } }; -unsigned int MOD_maxid; -RECT MOD_rc[MOD_NRMENUS]; -int MOD_avec, MOD_hic; -int MOD_odheight; -SIZE MODsizes[MOD_NRMENUS]= { {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}, +static unsigned int MOD_maxid; +static RECT MOD_rc[MOD_NRMENUS]; +static int MOD_avec, MOD_hic; +static int MOD_odheight; +static SIZE MODsizes[MOD_NRMENUS]= { {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}, {MOD_SIZE, MOD_SIZE},{MOD_SIZE, MOD_SIZE}}; -int MOD_GotDrawItemMsg = FALSE; +static int MOD_GotDrawItemMsg = FALSE; /* wndproc used by test_menu_ownerdraw() */ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) @@ -1259,10 +1259,10 @@ static void test_menu_iteminfo( void ) } /* - The following tests try to confirm the algorithm used to return the menu items + The following tests try to confirm the algorithm used to return the menu items when there is a collision between a menu item and a popup menu */ -void test_menu_search_bycommand( void ) +static void test_menu_search_bycommand( void ) { HMENU hmenu, hmenuSub, hmenuSub2; MENUITEMINFO info; @@ -1774,7 +1774,7 @@ static void test_menu_input(void) { DestroyWindow(hWnd); } -void test_menu_flags( void ) +static void test_menu_flags( void ) { HMENU hMenu, hPopupMenu; @@ -1805,7 +1805,7 @@ void test_menu_flags( void ) DestroyMenu(hMenu); } -void test_menu_hilitemenuitem( void ) +static void test_menu_hilitemenuitem( void ) { HMENU hMenu, hPopupMenu; diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 1555e5a80b7..189cef74318 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -1331,7 +1331,7 @@ static int get_tmheight( LOGFONTA *plf, int flag) return tm.tmHeight + (flag ? tm.tmExternalLeading : 0); } -void test_GetSystemMetrics( void); +static void test_GetSystemMetrics( void); static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */ { @@ -2234,7 +2234,7 @@ static LONG _GdiGetCharDimensions(HDC hdc, LPTEXTMETRICA lptm, LONG *height) /* get text metrics and/or "average" char width of the specified logfont * for the specified dc */ -void get_text_metr_size( HDC hdc, LOGFONTA *plf, TEXTMETRICA * ptm, UINT *psz) +static void get_text_metr_size( HDC hdc, LOGFONTA *plf, TEXTMETRICA * ptm, UINT *psz) { HFONT hfont, hfontsav; TEXTMETRICA tm; @@ -2282,7 +2282,7 @@ static UINT smcxsmsize = 999999999; ok( !( exp1 != act && exp2 != act && exp3 != act),"GetSystemMetrics(%s): expected %d or %d or %d actual %d\n", #i, exp1, exp2, exp3, act);\ } -void test_GetSystemMetrics( void) +static void test_GetSystemMetrics( void) { TEXTMETRICA tmMenuFont; UINT IconSpacing, IconVerticalSpacing; diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 094a947c1e2..ceddf76adbc 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -98,7 +98,7 @@ static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_ } } -BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam) +static BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam) { (*(LPINT)lParam)++; trace("EnumChildProc on %p\n", hwndChild); @@ -107,7 +107,7 @@ BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam) } /* will search for the given window */ -BOOL CALLBACK EnumChildProc1( HWND hwndChild, LPARAM lParam) +static BOOL CALLBACK EnumChildProc1( HWND hwndChild, LPARAM lParam) { trace("EnumChildProc1 on %p\n", hwndChild); if ((HWND)lParam == hwndChild) return FALSE;