Commit 525b5f4e authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

comcat: Declare some variables static and const.

parent 427a7638
...@@ -433,7 +433,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone( ...@@ -433,7 +433,7 @@ static HRESULT WINAPI COMCAT_IEnumCATEGORYINFO_Clone(
IEnumCATEGORYINFO **ppenum) IEnumCATEGORYINFO **ppenum)
{ {
IEnumCATEGORYINFOImpl *This = (IEnumCATEGORYINFOImpl *)iface; IEnumCATEGORYINFOImpl *This = (IEnumCATEGORYINFOImpl *)iface;
WCHAR keyname[21] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', static const WCHAR keyname[] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
't', ' ', 'C', 'a', 't', 'e', 'g', 'o', 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
'r', 'i', 'e', 's', 0 }; 'r', 'i', 'e', 's', 0 };
IEnumCATEGORYINFOImpl *new_this; IEnumCATEGORYINFOImpl *new_this;
...@@ -473,7 +473,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid) ...@@ -473,7 +473,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl)); This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumCATEGORYINFOImpl));
if (This) { if (This) {
WCHAR keyname[21] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', static const WCHAR keyname[] = { 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n',
't', ' ', 'C', 'a', 't', 'e', 'g', 'o', 't', ' ', 'C', 'a', 't', 'e', 'g', 'o',
'r', 'i', 'e', 's', 0 }; 'r', 'i', 'e', 's', 0 };
...@@ -490,7 +490,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid) ...@@ -490,7 +490,7 @@ static LPENUMCATEGORYINFO COMCAT_IEnumCATEGORYINFO_Construct(LCID lcid)
static HRESULT COMCAT_GetCategoryDesc(HKEY key, LCID lcid, PWCHAR pszDesc, static HRESULT COMCAT_GetCategoryDesc(HKEY key, LCID lcid, PWCHAR pszDesc,
ULONG buf_wchars) ULONG buf_wchars)
{ {
WCHAR fmt[4] = { '%', 'l', 'X', 0 }; static const WCHAR fmt[] = { '%', 'l', 'X', 0 };
WCHAR valname[5]; WCHAR valname[5];
HRESULT res; HRESULT res;
DWORD type, size = (buf_wchars - 1) * sizeof(WCHAR); DWORD type, size = (buf_wchars - 1) * sizeof(WCHAR);
...@@ -549,10 +549,10 @@ static HRESULT COMCAT_IsClassOfCategories( ...@@ -549,10 +549,10 @@ static HRESULT COMCAT_IsClassOfCategories(
HKEY key, HKEY key,
struct class_categories const* categories) struct class_categories const* categories)
{ {
WCHAR impl_keyname[23] = { 'I', 'm', 'p', 'l', 'e', 'm', 'e', 'n', static const WCHAR impl_keyname[] = { 'I', 'm', 'p', 'l', 'e', 'm', 'e', 'n',
't', 'e', 'd', ' ', 'C', 'a', 't', 'e', 't', 'e', 'd', ' ', 'C', 'a', 't', 'e',
'g', 'o', 'r', 'i', 'e', 's', 0 }; 'g', 'o', 'r', 'i', 'e', 's', 0 };
WCHAR req_keyname[20] = { 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'd', static const WCHAR req_keyname[] = { 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'd',
' ', 'C', 'a', 't', 'e', 'g', 'o', 'r', ' ', 'C', 'a', 't', 'e', 'g', 'o', 'r',
'i', 'e', 's', 0 }; 'i', 'e', 's', 0 };
HKEY subkey; HKEY subkey;
...@@ -735,7 +735,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone( ...@@ -735,7 +735,7 @@ static HRESULT WINAPI COMCAT_CLSID_IEnumGUID_Clone(
IEnumGUID **ppenum) IEnumGUID **ppenum)
{ {
CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface; CLSID_IEnumGUIDImpl *This = (CLSID_IEnumGUIDImpl *)iface;
WCHAR keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 }; static const WCHAR keyname[] = { 'C', 'L', 'S', 'I', 'D', 0 };
CLSID_IEnumGUIDImpl *new_this; CLSID_IEnumGUIDImpl *new_this;
DWORD size; DWORD size;
......
...@@ -111,7 +111,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories( ...@@ -111,7 +111,7 @@ static HRESULT WINAPI COMCAT_ICatRegister_RegisterCategories(
if (res != ERROR_SUCCESS) return E_FAIL; if (res != ERROR_SUCCESS) return E_FAIL;
for (; cCategories; --cCategories, ++rgci) { for (; cCategories; --cCategories, ++rgci) {
WCHAR fmt[4] = { '%', 'l', 'X', 0 }; static const WCHAR fmt[] = { '%', 'l', 'X', 0 };
WCHAR keyname[39]; WCHAR keyname[39];
WCHAR valname[9]; WCHAR valname[9];
HKEY cat_key; HKEY cat_key;
......
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