tests: Make some variables static.

This commit is contained in:
Alexandre Julliard 2010-10-01 13:41:42 +02:00
parent 95c1bd4da9
commit 730f01801f
21 changed files with 50 additions and 50 deletions

View file

@ -29,12 +29,12 @@
#define FOLDER_THRESHOLD 900000
/* function pointers */
HMODULE hAdvPack;
static HMODULE hAdvPack;
static HRESULT (WINAPI *pAddDelBackupEntry)(LPCSTR, LPCSTR, LPCSTR, DWORD);
static HRESULT (WINAPI *pExtractFiles)(LPCSTR, LPCSTR, DWORD, LPCSTR, LPVOID, DWORD);
static HRESULT (WINAPI *pAdvInstallFile)(HWND,LPCSTR,LPCSTR,LPCSTR,LPCSTR,DWORD,DWORD);
CHAR CURR_DIR[MAX_PATH];
static CHAR CURR_DIR[MAX_PATH];
static void init_function_pointers(void)
{

View file

@ -29,9 +29,9 @@
#define FILE_LEN 9
static const char fileA[FILE_LEN] = "test.avi";
IAMMultiMediaStream* pams;
IDirectDraw7* pdd7 = NULL;
IDirectDrawSurface7* pdds7 = NULL;
static IAMMultiMediaStream* pams;
static IDirectDraw7* pdd7;
static IDirectDrawSurface7* pdds7;
static int create_ammultimediastream(void)
{

View file

@ -304,7 +304,7 @@ static void test_create_view_template(void)
}
/* test cases for resizing of the file dialog */
struct {
static const struct {
DWORD flags;
int resize_folderchange;/* change in CDN_FOLDERCHANGE handler */
int resize_timer1; /* change in first WM_TIMER handler */

View file

@ -545,7 +545,7 @@ static const BYTE rootSignedCRL[] = {
0xd5,0xbc,0xb0,0xd5,0xa5,0x9c,0x1b,0x72,0xc3,0x0f,0xa3,0xe3,0x3c,0xf0,0xc3,
0x91,0xe8,0x93,0x4f,0xd4,0x2f };
BOOL (WINAPI *pCertVerifyRevocation)(DWORD, DWORD, DWORD, void **, DWORD,
static BOOL (WINAPI *pCertVerifyRevocation)(DWORD, DWORD, DWORD, void **, DWORD,
PCERT_REVOCATION_PARA, PCERT_REVOCATION_STATUS);
/* Wednesday, Oct 1, 2007 */

View file

@ -1504,7 +1504,7 @@ cleanup:
}
static HWND filter_messages;
struct
static struct
{
HWND window;
UINT message;

View file

@ -47,21 +47,21 @@ static BOOL InitFunctionPtrs(void)
return TRUE;
}
char data_bad_version[] =
static char data_bad_version[] =
"xof 0302txt 0064\n"
"Header Object\n"
"{\n"
"1; 2; 3;\n"
"}\n";
char data_no_mesh[] =
static char data_no_mesh[] =
"xof 0302txt 0064\n"
"Header Object\n"
"{\n"
"1; 0; 1;\n"
"}\n";
char data_ok[] =
static char data_ok[] =
"xof 0302txt 0064\n"
"Header Object\n"
"{\n"

View file

@ -24,19 +24,19 @@
#include "ddraw.h"
#include "d3d.h"
HWND window;
IDirectDraw7 *DirectDraw = NULL;
IDirectDrawSurface7 *Surface;
IDirectDrawSurface7 *depth_buffer;
IDirect3D7 *Direct3D = NULL;
IDirect3DDevice7 *Direct3DDevice = NULL;
static HWND window;
static IDirectDraw7 *DirectDraw;
static IDirectDrawSurface7 *Surface;
static IDirectDrawSurface7 *depth_buffer;
static IDirect3D7 *Direct3D;
static IDirect3DDevice7 *Direct3DDevice;
IDirectDraw *DirectDraw1 = NULL;
IDirectDrawSurface *Surface1 = NULL;
IDirect3D *Direct3D1 = NULL;
IDirect3DDevice *Direct3DDevice1 = NULL;
IDirect3DExecuteBuffer *ExecuteBuffer = NULL;
IDirect3DViewport *Viewport = NULL;
static IDirectDraw *DirectDraw1;
static IDirectDrawSurface *Surface1;
static IDirect3D *Direct3D1;
static IDirect3DDevice *Direct3DDevice1;
static IDirect3DExecuteBuffer *ExecuteBuffer;
static IDirect3DViewport *Viewport;
static BOOL refdevice = FALSE;

View file

@ -24,7 +24,7 @@
#include <wine/test.h>
#include <dmusici.h>
IDirectMusicPerformance8 *idmusicperformance;
static IDirectMusicPerformance8 *idmusicperformance;
static HRESULT test_InitAudio(void)
{

View file

@ -295,7 +295,7 @@ static HRESULT WINAPI NSTCEvents_fnOnGetDefaultIconIndex(
return E_NOTIMPL;
}
const INameSpaceTreeControlEventsVtbl vt_NSTCEvents = {
static const INameSpaceTreeControlEventsVtbl vt_NSTCEvents = {
NSTCEvents_fnQueryInterface,
NSTCEvents_fnAddRef,
NSTCEvents_fnRelease,

View file

@ -36,16 +36,16 @@
#define near_match(a, b) (abs((a) - (b)) <= 6)
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
LONG (WINAPI *pGdiGetCharDimensions)(HDC hdc, LPTEXTMETRICW lptm, LONG *height);
BOOL (WINAPI *pGetCharABCWidthsI)(HDC hdc, UINT first, UINT count, LPWORD glyphs, LPABC abc);
BOOL (WINAPI *pGetCharABCWidthsW)(HDC hdc, UINT first, UINT last, LPABC abc);
DWORD (WINAPI *pGetFontUnicodeRanges)(HDC hdc, LPGLYPHSET lpgs);
DWORD (WINAPI *pGetGlyphIndicesA)(HDC hdc, LPCSTR lpstr, INT count, LPWORD pgi, DWORD flags);
DWORD (WINAPI *pGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags);
BOOL (WINAPI *pGdiRealizationInfo)(HDC hdc, DWORD *);
HFONT (WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDV *);
HANDLE (WINAPI *pAddFontMemResourceEx)(PVOID, DWORD, PVOID, DWORD *);
BOOL (WINAPI *pRemoveFontMemResourceEx)(HANDLE);
static LONG (WINAPI *pGdiGetCharDimensions)(HDC hdc, LPTEXTMETRICW lptm, LONG *height);
static BOOL (WINAPI *pGetCharABCWidthsI)(HDC hdc, UINT first, UINT count, LPWORD glyphs, LPABC abc);
static BOOL (WINAPI *pGetCharABCWidthsW)(HDC hdc, UINT first, UINT last, LPABC abc);
static DWORD (WINAPI *pGetFontUnicodeRanges)(HDC hdc, LPGLYPHSET lpgs);
static DWORD (WINAPI *pGetGlyphIndicesA)(HDC hdc, LPCSTR lpstr, INT count, LPWORD pgi, DWORD flags);
static DWORD (WINAPI *pGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags);
static BOOL (WINAPI *pGdiRealizationInfo)(HDC hdc, DWORD *);
static HFONT (WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDV *);
static HANDLE (WINAPI *pAddFontMemResourceEx)(PVOID, DWORD, PVOID, DWORD *);
static BOOL (WINAPI *pRemoveFontMemResourceEx)(HANDLE);
static HMODULE hgdi32 = 0;

View file

@ -30,8 +30,8 @@
#include "wine/test.h"
HMODULE hmscms;
HMODULE huser32;
static HMODULE hmscms;
static HMODULE huser32;
static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR);
static BOOL (WINAPI *pCloseColorProfile)(HPROFILE);

View file

@ -40,7 +40,7 @@ static unsigned __int64 (__cdecl *p_strtoui64)(const char *, char **, int);
static void* (WINAPI *pEncodePointer)(void *);
int cb_called[4];
static int cb_called[4];
/* ########## */

View file

@ -65,7 +65,7 @@ static unsigned char *p_mbctype;
#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)
HMODULE hMsvcrt;
static HMODULE hMsvcrt;
static void test_swab( void ) {
char original[] = "BADCFEHGJILKNMPORQTSVUXWZY@#";

View file

@ -311,8 +311,8 @@ static BSTR alloc_str_from_narrow(const char *str)
return ret;
}
BSTR alloced_bstrs[256];
int alloced_bstrs_count = 0;
static BSTR alloced_bstrs[256];
static int alloced_bstrs_count;
static BSTR _bstr_(const char *str)
{

View file

@ -146,7 +146,7 @@ static void test_dcinfo(void)
IDCInfo_Release(info);
}
struct can_convert
static const struct can_convert
{
DBTYPE type;
DWORD can_convert_to;

View file

@ -35,7 +35,7 @@ const unsigned char * WINAPI glGetString(unsigned int);
typedef void* HPBUFFERARB;
/* WGL_ARB_create_context */
HGLRC (WINAPI *pwglCreateContextAttribsARB)(HDC hDC, HGLRC hShareContext, const int *attribList);
static HGLRC (WINAPI *pwglCreateContextAttribsARB)(HDC hDC, HGLRC hShareContext, const int *attribList);
/* GetLastError */
#define ERROR_INVALID_VERSION_ARB 0x2095
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091

View file

@ -31,7 +31,7 @@
static const char avifileA[FILE_LEN] = "test.avi";
static const char mpegfileA[FILE_LEN] = "test.mpg";
IGraphBuilder* pgraph;
static IGraphBuilder *pgraph;
static int createfiltergraph(void)
{

View file

@ -25,8 +25,8 @@
#include <rpc.h>
#include <rpcasync.h>
RPC_STATUS (RPC_ENTRY *pRpcAsyncInitializeHandle)(PRPC_ASYNC_STATE,unsigned int);
RPC_STATUS (RPC_ENTRY *pRpcAsyncGetCallStatus)(PRPC_ASYNC_STATE);
static RPC_STATUS (RPC_ENTRY *pRpcAsyncInitializeHandle)(PRPC_ASYNC_STATE,unsigned int);
static RPC_STATUS (RPC_ENTRY *pRpcAsyncGetCallStatus)(PRPC_ASYNC_STATE);
static void test_RpcAsyncInitializeHandle(void)
{

View file

@ -2810,7 +2810,7 @@ static ULONG WINAPI unk_fnRelease(IUnknown *iunk)
return 1;
}
const IUnknownVtbl vt_IUnknown = {
static const IUnknownVtbl vt_IUnknown = {
unk_fnQueryInterface,
unk_fnAddRef,
unk_fnRelease

View file

@ -952,7 +952,7 @@ static void do_test( test_setup *test )
/********* some tests for getsockopt(setsockopt(X)) == X ***********/
/* optname = SO_LINGER */
LINGER linger_testvals[] = {
static const LINGER linger_testvals[] = {
{0,0},
{0,73},
{1,0},

View file

@ -32,8 +32,8 @@
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
HRESULT WINAPI (*pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc);
HRESULT WINAPI (*pCreateXmlReaderInputWithEncodingName)(IUnknown *stream,
static HRESULT WINAPI (*pCreateXmlReader)(REFIID riid, void **ppvObject, IMalloc *pMalloc);
static HRESULT WINAPI (*pCreateXmlReaderInputWithEncodingName)(IUnknown *stream,
IMalloc *pMalloc,
LPCWSTR encoding,
BOOL hint,