Make static Unicode strings const.
diff --git a/controls/icontitle.c b/controls/icontitle.c index 9f89c4e..b49cba2 100644 --- a/controls/icontitle.c +++ b/controls/icontitle.c
@@ -86,7 +86,7 @@ */ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner ) { - static WCHAR emptyTitleText[] = {'<','.','.','.','>',0}; + static const WCHAR emptyTitleText[] = {'<','.','.','.','>',0}; WCHAR str[80]; HDC hDC; HFONT hPrevFont;
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 3ee7de3..20b4a91 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c
@@ -524,7 +524,7 @@ { WCHAR szTitle[256]; const WCHAR *pTitle; - static WCHAR pszNull[] = { '(','n','u','l','l',')',0 }; + static const WCHAR pszNull[] = { '(','n','u','l','l',')',0 }; int len; if ( !HIWORD( lppsp->pszTitle ) )
diff --git a/dlls/msacm/format.c b/dlls/msacm/format.c index b682568..acdf7cf 100644 --- a/dlls/msacm/format.c +++ b/dlls/msacm/format.c
@@ -317,8 +317,8 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails) { MMRESULT mmr; - static WCHAR fmt1[] = {'%','d',' ','H','z',0}; - static WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0}; + static const WCHAR fmt1[] = {'%','d',' ','H','z',0}; + static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0}; ACMFORMATTAGDETAILSA aftd; TRACE("(%p, %p, %ld)\n", had, pafd, fdwDetails);
diff --git a/dlls/msacm/imaadp32/imaadp32.c b/dlls/msacm/imaadp32/imaadp32.c index 61d3d00..a4a3535 100644 --- a/dlls/msacm/imaadp32/imaadp32.c +++ b/dlls/msacm/imaadp32/imaadp32.c
@@ -499,8 +499,8 @@ */ static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery) { - static WCHAR szPcm[]={'P','C','M',0}; - static WCHAR szImaAdPcm[]={'I','M','A',' ','A','d','P','C','M',0}; + static const WCHAR szPcm[]={'P','C','M',0}; + static const WCHAR szImaAdPcm[]={'I','M','A',' ','A','d','P','C','M',0}; switch (dwQuery) {
diff --git a/dlls/msacm/internal.c b/dlls/msacm/internal.c index d54c764..ab801a1 100644 --- a/dlls/msacm/internal.c +++ b/dlls/msacm/internal.c
@@ -236,7 +236,7 @@ /*********************************************************************** * MSACM_RegisterDriver() */ -PWINE_ACMDRIVERID MSACM_RegisterDriver(LPWSTR pszDriverAlias, LPWSTR pszFileName, +PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, HINSTANCE hinstModule) { PWINE_ACMDRIVERID padid; @@ -285,10 +285,10 @@ { LPWSTR pszBuffer; DWORD dwBufferLength; - static WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'}; - static WCHAR msacmW[] = {'M','S','A','C','M','.'}; - static WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'}; - static WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'}; + static const WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'}; + static const WCHAR msacmW[] = {'M','S','A','C','M','.'}; + static const WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'}; + static const WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'}; /* FIXME * What if the user edits system.ini while the program is running?
diff --git a/dlls/msacm/msadp32/msadp32.c b/dlls/msacm/msadp32/msadp32.c index dae681c..bf17154 100644 --- a/dlls/msacm/msadp32/msadp32.c +++ b/dlls/msacm/msadp32/msadp32.c
@@ -345,8 +345,8 @@ */ static LRESULT ADPCM_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery) { - static WCHAR szPcm[]={'P','C','M',0}; - static WCHAR szMsAdPcm[]={'M','S',' ','A','d','P','C','M',0}; + static const WCHAR szPcm[]={'P','C','M',0}; + static const WCHAR szMsAdPcm[]={'M','S',' ','A','d','P','C','M',0}; switch (dwQuery) {
diff --git a/dlls/msacm/msg711/msg711.c b/dlls/msacm/msg711/msg711.c index 1f04369..d4d7623 100644 --- a/dlls/msacm/msg711/msg711.c +++ b/dlls/msacm/msg711/msg711.c
@@ -682,9 +682,9 @@ */ static LRESULT G711_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery) { - static WCHAR szPcm[]={'P','C','M',0}; - static WCHAR szALaw[]={'A','-','L','a','w',0}; - static WCHAR szULaw[]={'U','-','L','a','w',0}; + static const WCHAR szPcm[]={'P','C','M',0}; + static const WCHAR szALaw[]={'A','-','L','a','w',0}; + static const WCHAR szULaw[]={'U','-','L','a','w',0}; switch (dwQuery) {
diff --git a/dlls/msacm/wineacm.h b/dlls/msacm/wineacm.h index 702ab01..4f781b4 100644 --- a/dlls/msacm/wineacm.h +++ b/dlls/msacm/wineacm.h
@@ -337,7 +337,7 @@ extern HANDLE MSACM_hHeap; extern PWINE_ACMDRIVERID MSACM_pFirstACMDriverID; extern PWINE_ACMDRIVERID MSACM_pLastACMDriverID; -extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPWSTR pszDriverAlias, LPWSTR pszFileName, +extern PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileName, HINSTANCE hinstModule); extern void MSACM_RegisterAllDrivers(void); extern PWINE_ACMDRIVERID MSACM_UnregisterDriver(PWINE_ACMDRIVERID p);
diff --git a/dlls/msacm/winemp3/mpegl3.c b/dlls/msacm/winemp3/mpegl3.c index 466eeba..c710a01 100644 --- a/dlls/msacm/winemp3/mpegl3.c +++ b/dlls/msacm/winemp3/mpegl3.c
@@ -200,8 +200,8 @@ */ static LRESULT MPEG3_FormatTagDetails(PACMFORMATTAGDETAILSW aftd, DWORD dwQuery) { - static WCHAR szPcm[]={'P','C','M',0}; - static WCHAR szMpeg3[]={'M','P','e','g','3',0}; + static const WCHAR szPcm[]={'P','C','M',0}; + static const WCHAR szMpeg3[]={'M','P','e','g','3',0}; switch (dwQuery) {
diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index ac5857e..35eac43 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c
@@ -272,7 +272,7 @@ HDRVR hdrv; WINE_HIC* whic; BOOL bIs16; - static WCHAR drv32W[] = {'d','r','i','v','e','r','s','3','2','\0'}; + static const WCHAR drv32W[] = {'d','r','i','v','e','r','s','3','2','\0'}; reg_driver* driver; TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode);
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 135ca8d..43cdfe8 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c
@@ -1316,10 +1316,10 @@ static void test_VarFormatNumber(void) { - static WCHAR szSrc1[] = { '1','\0' }; - static WCHAR szResult1[] = { '1','.','0','0','\0' }; - static WCHAR szSrc2[] = { '-','1','\0' }; - static WCHAR szResult2[] = { '(','1','.','0','0',')','\0' }; + static const WCHAR szSrc1[] = { '1','\0' }; + static const WCHAR szResult1[] = { '1','.','0','0','\0' }; + static const WCHAR szSrc2[] = { '-','1','\0' }; + static const WCHAR szResult2[] = { '(','1','.','0','0',')','\0' }; char buff[8]; HRESULT hres; VARIANT v;
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 2b51458..fcc494d 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c
@@ -546,7 +546,7 @@ WARN("failed to load %s\n", debugstr_w(moduleName)); } -static WCHAR securityProvidersKeyW[] = { +static const WCHAR securityProvidersKeyW[] = { 'S','Y','S','T','E','M','\\','C','u','r','r','e','n','t','C','o','n','t','r', 'o','l','S','e','t','\\','C','o','n','t','r','o','l','\\','S','e','c','u','r', 'i','t','y','P','r','o','v','i','d','e','r','s','\0'
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index 536e35f..f183af1 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c
@@ -1140,8 +1140,8 @@ */ static BOOL WINAPI SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich) { - static WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'}; - static WCHAR szPath[] = { 'P','A','T','H','\0'}; + static const WCHAR szSystem[] = { 'S','y','s','t','e','m','\0'}; + static const WCHAR szPath[] = { 'P','A','T','H','\0'}; DWORD dwLenPATH; LPCWSTR lpszCurr; WCHAR *lpszPATH;
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index f5d6561..6d38930 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c
@@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); /* native urlmon.dll uses this key, too */ -static WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; +static const WCHAR BSCBHolder[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }; /*static BOOL registered_wndclass = FALSE;*/
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index 9f63afe..ccf2a8a 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c
@@ -960,10 +960,10 @@ */ HRESULT MSSTYLES_GetPropertyFont(PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont) { - const WCHAR szBold[] = {'b','o','l','d','\0'}; - const WCHAR szItalic[] = {'i','t','a','l','i','c','\0'}; - const WCHAR szUnderline[] = {'u','n','d','e','r','l','i','n','e','\0'}; - const WCHAR szStrikeOut[] = {'s','t','r','i','k','e','o','u','t','\0'}; + static const WCHAR szBold[] = {'b','o','l','d','\0'}; + static const WCHAR szItalic[] = {'i','t','a','l','i','c','\0'}; + static const WCHAR szUnderline[] = {'u','n','d','e','r','l','i','n','e','\0'}; + static const WCHAR szStrikeOut[] = {'s','t','r','i','k','e','o','u','t','\0'}; int pointSize; WCHAR attr[32]; LPCWSTR lpCur = tp->lpValue;
diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index e2e928b..39f5d4e 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c
@@ -62,13 +62,13 @@ HKEY hRegSnd, hRegApp, hScheme, hSnd; DWORD err, type, count; - static WCHAR wszSounds[] = {'S','o','u','n','d','s',0}; - static WCHAR wszDefault[] = {'D','e','f','a','u','l','t',0}; - static WCHAR wszKey[] = {'A','p','p','E','v','e','n','t','s','\\', + static const WCHAR wszSounds[] = {'S','o','u','n','d','s',0}; + static const WCHAR wszDefault[] = {'D','e','f','a','u','l','t',0}; + static const WCHAR wszKey[] = {'A','p','p','E','v','e','n','t','s','\\', 'S','c','h','e','m','e','s','\\', 'A','p','p','s',0}; - static WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0}; - static WCHAR wszNull[] = {0}; + static const WCHAR wszDotDefault[] = {'.','D','e','f','a','u','l','t',0}; + static const WCHAR wszNull[] = {0}; TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName)); GetProfileStringW(wszSounds, (LPWSTR)lpszName, wszNull, str, sizeof(str)/sizeof(str[0])); @@ -257,7 +257,7 @@ /* if resource, grab it */ if ((wps->fdwSound & SND_RESOURCE) == SND_RESOURCE) { - static WCHAR wszWave[] = {'W','A','V','E',0}; + static const WCHAR wszWave[] = {'W','A','V','E',0}; HRSRC hRes; HGLOBAL hGlob;
diff --git a/dlls/wsock32/protocol.c b/dlls/wsock32/protocol.c index 03b0b8a..864dab0 100644 --- a/dlls/wsock32/protocol.c +++ b/dlls/wsock32/protocol.c
@@ -53,11 +53,11 @@ /* name of the protocols */ -static WCHAR NameIpx[] = {'I', 'P', 'X', '\0'}; -static WCHAR NameSpx[] = {'S', 'P', 'X', '\0'}; -static WCHAR NameSpxII[] = {'S', 'P', 'X', ' ', 'I', 'I', '\0'}; -static WCHAR NameTcp[] = {'T', 'C', 'P', '/', 'I', 'P', '\0'}; -static WCHAR NameUdp[] = {'U', 'D', 'P', '/', 'I', 'P', '\0'}; +static const WCHAR NameIpx[] = {'I', 'P', 'X', '\0'}; +static const WCHAR NameSpx[] = {'S', 'P', 'X', '\0'}; +static const WCHAR NameSpxII[] = {'S', 'P', 'X', ' ', 'I', 'I', '\0'}; +static const WCHAR NameTcp[] = {'T', 'C', 'P', '/', 'I', 'P', '\0'}; +static const WCHAR NameUdp[] = {'U', 'D', 'P', '/', 'I', 'P', '\0'}; /***************************************************************************** * WSOCK32_EnterSingleProtocol [internal]
diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c index 6ca6696..ef60b86 100644 --- a/programs/wineconsole/dialog.c +++ b/programs/wineconsole/dialog.c
@@ -608,8 +608,8 @@ SendDlgItemMessage(hDlg, IDC_CNF_CLOSE_EXIT, BM_SETCHECK, (di->config.exit_on_die) ? BST_CHECKED : BST_UNCHECKED, 0L); { - static WCHAR s1[] = {'W','i','n','3','2',0}; - static WCHAR s2[] = {'E','m','a','c','s',0}; + static const WCHAR s1[] = {'W','i','n','3','2',0}; + static const WCHAR s2[] = {'E','m','a','c','s',0}; SendDlgItemMessage(hDlg, IDC_CNF_EDITION_MODE, CB_ADDSTRING, 0, (LPARAM)s1);
diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 222fe55..2ef463e 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c
@@ -1355,7 +1355,7 @@ */ enum init_return WCUSER_InitBackend(struct inner_data* data) { - static WCHAR wClassName[] = {'W','i','n','e','C','o','n','s','o','l','e','C','l','a','s','s',0}; + static const WCHAR wClassName[] = {'W','i','n','e','C','o','n','s','o','l','e','C','l','a','s','s',0}; WNDCLASS wndclass;
diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c index 5dbf989..e1120ba 100644 --- a/tools/wmc/mcl.c +++ b/tools/wmc/mcl.c
@@ -588,8 +588,8 @@ */ int yylex(void) { - static WCHAR ustr_dot1[] = { '.', '\n', 0 }; - static WCHAR ustr_dot2[] = { '.', '\r', '\n', 0 }; + static const WCHAR ustr_dot1[] = { '.', '\n', 0 }; + static const WCHAR ustr_dot2[] = { '.', '\r', '\n', 0 }; static int isinit = 0; int ch;