Alexandre Julliard : ole32/tests: Make some variables static.

Alexandre Julliard julliard at winehq.org
Fri Oct 1 11:38:40 CDT 2010


Module: wine
Branch: master
Commit: bc8e70c0891790fc1144cb416aaa88877165d66b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc8e70c0891790fc1144cb416aaa88877165d66b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Oct  1 13:37:14 2010 +0200

ole32/tests: Make some variables static.

---

 dlls/ole32/tests/clipboard.c   |    6 +++---
 dlls/ole32/tests/compobj.c     |   10 +++++-----
 dlls/ole32/tests/marshal.c     |    6 +++---
 dlls/ole32/tests/ole2.c        |    4 ++--
 dlls/ole32/tests/propvariant.c |    2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c
index 626d244..1afa0e3 100644
--- a/dlls/ole32/tests/clipboard.c
+++ b/dlls/ole32/tests/clipboard.c
@@ -387,9 +387,9 @@ static HRESULT DataObjectImpl_CreateText(LPCSTR text, LPDATAOBJECT *lplpdataobj)
     return S_OK;
 }
 
-const char *cmpl_stm_data = "complex stream";
-const char *cmpl_text_data = "complex text";
-const WCHAR device_name[] = {'m','y','d','e','v',0};
+static const char *cmpl_stm_data = "complex stream";
+static const char *cmpl_text_data = "complex text";
+static const WCHAR device_name[] = {'m','y','d','e','v',0};
 
 static HRESULT DataObjectImpl_CreateComplex(LPDATAOBJECT *lplpdataobj)
 {
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index 9d469b4..2d67b1e 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -36,11 +36,11 @@
 #include "wine/test.h"
 
 /* functions that are not present on all versions of Windows */
-HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
-HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv);
-HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject);
-HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew);
-HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token);
+static HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
+static HRESULT (WINAPI * pCoGetObjectContext)(REFIID riid, LPVOID *ppv);
+static HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppOldObject);
+static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew);
+static HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token);
 
 #define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
 #define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index 20b0d8b..ef101ae 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -38,7 +38,7 @@
 DEFINE_GUID(CLSID_StdGlobalInterfaceTable,0x00000323,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
 
 /* functions that are not present on all versions of Windows */
-HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
+static HRESULT (WINAPI * pCoInitializeEx)(LPVOID lpReserved, DWORD dwCoInit);
 
 /* helper macros to make tests a bit leaner */
 #define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
@@ -1845,7 +1845,7 @@ static const IClassFactoryVtbl TestREClassFactory_Vtbl =
     Test_IClassFactory_LockServer
 };
 
-IClassFactory TestRE_ClassFactory = { &TestREClassFactory_Vtbl };
+static IClassFactory TestRE_ClassFactory = { &TestREClassFactory_Vtbl };
 
 static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
 {
@@ -2011,7 +2011,7 @@ static IClassFactoryVtbl TestMsgClassFactory_Vtbl =
     Test_IClassFactory_LockServer
 };
 
-IClassFactory TestMsg_ClassFactory = { &TestMsgClassFactory_Vtbl };
+static IClassFactory TestMsg_ClassFactory = { &TestMsgClassFactory_Vtbl };
 
 static void test_call_from_message(void)
 {
diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c
index 3db2cb5..cd83a3b 100644
--- a/dlls/ole32/tests/ole2.c
+++ b/dlls/ole32/tests/ole2.c
@@ -55,8 +55,8 @@ struct expected_method
 static const struct expected_method *expected_method_list;
 static FORMATETC *g_expected_fetc = NULL;
 
-BOOL g_showRunnable = TRUE;
-BOOL g_isRunning = TRUE;
+static BOOL g_showRunnable = TRUE;
+static BOOL g_isRunning = TRUE;
 
 #define CHECK_EXPECTED_METHOD(method_name) \
     do { \
diff --git a/dlls/ole32/tests/propvariant.c b/dlls/ole32/tests/propvariant.c
index 380dc14..4d34117 100644
--- a/dlls/ole32/tests/propvariant.c
+++ b/dlls/ole32/tests/propvariant.c
@@ -32,7 +32,7 @@
 #define PROP_V1A 2
 #define PROP_TODO 0x80
 
-struct valid_mapping
+static const struct valid_mapping
 {
     BYTE simple;
     BYTE with_array;




More information about the wine-cvs mailing list