Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/advapi32/security.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 16512d094c..70e2da40e7 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -440,10 +440,10 @@ static inline DWORD get_security_service( LPWSTR full_service_name, DWORD access /* helper function for SE_REGISTRY_KEY objects in [Get|Set]NamedSecurityInfo */ static inline DWORD get_security_regkey( LPWSTR full_key_name, DWORD access, HANDLE *key ) { - WCHAR classes_rootW[] = {'C','L','A','S','S','E','S','_','R','O','O','T',0}; - WCHAR current_userW[] = {'C','U','R','R','E','N','T','_','U','S','E','R',0}; - WCHAR machineW[] = {'M','A','C','H','I','N','E',0}; - WCHAR usersW[] = {'U','S','E','R','S',0}; + static const WCHAR classes_rootW[] = {'C','L','A','S','S','E','S','_','R','O','O','T',0}; + static const WCHAR current_userW[] = {'C','U','R','R','E','N','T','_','U','S','E','R',0}; + static const WCHAR machineW[] = {'M','A','C','H','I','N','E',0}; + static const WCHAR usersW[] = {'U','S','E','R','S',0}; LPWSTR p = strchrW(full_key_name, '\'); int len = p-full_key_name; HKEY hParent; @@ -4997,9 +4997,9 @@ static void DumpString(LPCWSTR string, int cch, WCHAR **pwptr, ULONG *plen)
static BOOL DumpSidNumeric(PSID psid, WCHAR **pwptr, ULONG *plen) { + static const WCHAR fmt[] = { 'S','-','%','u','-','%','d',0 }; + static const WCHAR subauthfmt[] = { '-','%','u',0 }; DWORD i; - WCHAR fmt[] = { 'S','-','%','u','-','%','d',0 }; - WCHAR subauthfmt[] = { '-','%','u',0 }; WCHAR buf[26]; SID *pisid = psid;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/advpack/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/advpack/reg.c b/dlls/advpack/reg.c index fd0a199b00..82c1d2b6e8 100644 --- a/dlls/advpack/reg.c +++ b/dlls/advpack/reg.c @@ -41,8 +41,8 @@ static const WCHAR quote[] = {'"',0};
static BOOL get_temp_ini_path(LPWSTR name) { + static const WCHAR prefix[] = {'a','v','p',0}; WCHAR tmp_dir[MAX_PATH]; - WCHAR prefix[] = {'a','v','p',0};
if(!GetTempPathW(ARRAY_SIZE(tmp_dir), tmp_dir)) return FALSE;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/amstream/amstream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 3b2f71add5..f9c9abfecd 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -235,9 +235,9 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream /*** IAMMultiMediaStream methods ***/ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph) { + static const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0}; IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT hr = S_OK; - const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0};
TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
@@ -394,13 +394,13 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags) { + static const WCHAR sourceW[] = {'S','o','u','r','c','e',0}; IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT ret = S_OK; IBaseFilter *BaseFilter = NULL; IEnumPins *EnumPins = NULL; IPin *ipin; PIN_DIRECTION pin_direction; - const WCHAR sourceW[] = {'S','o','u','r','c','e',0};
TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(filename), flags);
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Fri, Nov 30, 2018 at 12:13:58AM -0700, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/amstream/amstream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 3b2f71add5..f9c9abfecd 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -235,9 +235,9 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream /*** IAMMultiMediaStream methods ***/ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph) {
- static const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0}; IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT hr = S_OK;
const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0};
TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
@@ -394,13 +394,13 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags) {
- static const WCHAR sourceW[] = {'S','o','u','r','c','e',0}; IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT ret = S_OK; IBaseFilter *BaseFilter = NULL; IEnumPins *EnumPins = NULL; IPin *ipin; PIN_DIRECTION pin_direction;
const WCHAR sourceW[] = {'S','o','u','r','c','e',0};
TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(filename), flags);
-- 2.19.2
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/atl/atl_ax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index 81212780e0..ce180447f9 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -104,7 +104,7 @@ BOOL WINAPI AtlAxWinInit(void) #error Unsupported version #endif
- const WCHAR AtlAxWinW[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX}; + static const WCHAR AtlAxWinW[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX};
FIXME("version %04x semi-stub\n", _ATL_VER);
@@ -128,7 +128,7 @@ BOOL WINAPI AtlAxWinInit(void) return FALSE;
if(_ATL_VER > _ATL_VER_30) { - const WCHAR AtlAxWinLicW[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX}; + static const WCHAR AtlAxWinLicW[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX};
wcex.lpszClassName = AtlAxWinLicW; if ( !RegisterClassExW( &wcex ) )
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/browseui/progressdlg.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c index e10d8bd5ac..61078a1d71 100644 --- a/dlls/browseui/progressdlg.c +++ b/dlls/browseui/progressdlg.c @@ -89,9 +89,10 @@ static inline ProgressDialog *impl_from_IOleWindow(IOleWindow *iface) return CONTAINING_RECORD(iface, ProgressDialog, IOleWindow_iface); }
+static const WCHAR empty_string[] = {0}; + static void set_buffer(LPWSTR *buffer, LPCWSTR string) { - static const WCHAR empty_string[] = {0}; IMalloc *malloc; ULONG cb;
@@ -132,15 +133,13 @@ static void set_progress_marquee(ProgressDialog *This)
static void update_dialog(ProgressDialog *This, DWORD dwUpdate) { - WCHAR empty[] = {0}; - if (dwUpdate & UPDATE_TITLE) SetWindowTextW(This->hwnd, This->title);
if (dwUpdate & UPDATE_LINE1) - SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty : This->lines[0])); + SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty_string : This->lines[0])); if (dwUpdate & UPDATE_LINE2) - SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty : This->lines[1])); + SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty_string : This->lines[1])); if (dwUpdate & UPDATE_LINE3) SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+2, (This->isCancelled ? This->cancelMsg : This->lines[2]));
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/cryptui/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index b62ce9ef68..2b01c1dfae 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -46,6 +46,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(cryptui);
static HINSTANCE hInstance;
+static const WCHAR empty[] = {0}; + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); @@ -804,8 +806,6 @@ static LRESULT CALLBACK cert_mgr_advanced_dlg_proc(HWND hwnd, UINT msg,
static void cert_mgr_clear_cert_selection(HWND hwnd) { - WCHAR empty[] = { 0 }; - EnableWindow(GetDlgItem(hwnd, IDC_MGR_EXPORT), FALSE); EnableWindow(GetDlgItem(hwnd, IDC_MGR_REMOVE), FALSE); EnableWindow(GetDlgItem(hwnd, IDC_MGR_VIEW), FALSE); @@ -1166,7 +1166,6 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, break; case LVN_ITEMCHANGED: { - WCHAR empty[] = { 0 }; NMITEMACTIVATE *nm = (NMITEMACTIVATE*)lp; HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS); int numSelected = SendMessageW(lv, LVM_GETSELECTEDCOUNT, 0, 0);
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/dmusic/dmusic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 033983f6c8..fd450b8e36 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -373,8 +373,8 @@ static const IDirectMusic8Vtbl DirectMusic8_Vtbl = {
static void create_system_ports_list(IDirectMusic8Impl* object) { + static const WCHAR emulated[] = {' ','[','E','m','u','l','a','t','e','d',']',0}; port_info * port; - const WCHAR emulated[] = {' ','[','E','m','u','l','a','t','e','d',']',0}; ULONG nb_ports; ULONG nb_midi_out; ULONG nb_midi_in;
Signed-off-by: Michael Stefaniuc mstefani@winehq.org
On 11/30/18 8:14 AM, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/dmusic/dmusic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 033983f6c8..fd450b8e36 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -373,8 +373,8 @@ static const IDirectMusic8Vtbl DirectMusic8_Vtbl = {
static void create_system_ports_list(IDirectMusic8Impl* object) {
- static const WCHAR emulated[] = {' ','[','E','m','u','l','a','t','e','d',']',0}; port_info * port;
- const WCHAR emulated[] = {' ','[','E','m','u','l','a','t','e','d',']',0}; ULONG nb_ports; ULONG nb_midi_out; ULONG nb_midi_in;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/dwrite/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 6666249864..97b99f9775 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -4263,7 +4263,7 @@ HRESULT get_eudc_fontcollection(IDWriteFactory5 *factory, IDWriteFontCollection1 hr = IDWriteFontCollection1_FindFamilyName(&collection->IDWriteFontCollection1_iface, emptyW, &index, &exists); if (FAILED(hr) || !exists) { - const WCHAR globaldefaultW[] = {'E','U','D','C','.','T','T','E',0}; + static const WCHAR globaldefaultW[] = {'E','U','D','C','.','T','T','E',0}; hr = eudc_collection_add_family(factory, collection, emptyW, globaldefaultW); if (hr != S_OK) WARN("failed to add global default EUDC font, 0x%08x\n", hr);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/gdi32/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index f50c163f89..87c55e0598 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -7837,7 +7837,7 @@ static BOOL get_outline_text_metrics(GdiFont *font) full_nameW = get_face_name( ft_face, TT_NAME_ID_UNIQUE_ID, GetSystemDefaultLangID() ); if (!full_nameW) { - WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; + static const WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0}; FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w(font->name)); full_nameW = strdupW(fake_nameW); }
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/hhctrl.ocx/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/hhctrl.ocx/search.c b/dlls/hhctrl.ocx/search.c index d758a1b30f..0e198b8736 100644 --- a/dlls/hhctrl.ocx/search.c +++ b/dlls/hhctrl.ocx/search.c @@ -152,7 +152,7 @@ cleanup: static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage, const char *needle) { - const WCHAR szHTMext[] = {'.','h','t','m',0}; + static const WCHAR szHTMext[] = {'.','h','t','m',0}; IEnumSTATSTG *elem = NULL; WCHAR *filename = NULL; STATSTG entries;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/ieframe/iexplore.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/ieframe/iexplore.c b/dlls/ieframe/iexplore.c index 1a83ee38bb..4f3df13638 100644 --- a/dlls/ieframe/iexplore.c +++ b/dlls/ieframe/iexplore.c @@ -170,8 +170,8 @@ static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url
static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) { + static const WCHAR search[] = {'*',0}; WCHAR path[MAX_PATH*2]; - const WCHAR search[] = {'*',0}; WCHAR* filename; HANDLE findhandle; WIN32_FIND_DATAW finddata; @@ -202,9 +202,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
if(finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + static const WCHAR ignore1[] = {'.','.',0}; + static const WCHAR ignore2[] = {'.',0}; MENUITEMINFOW item; - const WCHAR ignore1[] = {'.','.',0}; - const WCHAR ignore2[] = {'.',0};
if(!lstrcmpW(filename, ignore1) || !lstrcmpW(filename, ignore2)) continue; @@ -217,9 +217,9 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir) add_favs_to_menu(favmenu, item.hSubMenu, path); } else { + static const WCHAR urlext[] = {'.','u','r','l',0}; WCHAR* fileext; WCHAR* url = NULL; - const WCHAR urlext[] = {'.','u','r','l',0};
if(lstrcmpiW(PathFindExtensionW(filename), urlext)) continue; @@ -250,18 +250,18 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
static void add_tbs_to_menu(HMENU menu) { + static const WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\', + 'M','i','c','r','o','s','o','f','t','\', + 'I','n','t','e','r','n','e','t',' ', + 'E','x','p','l','o','r','e','r','\', + 'T','o','o','l','b','a','r',0}; HUSKEY toolbar_handle; - WCHAR toolbar_key[] = {'S','o','f','t','w','a','r','e','\', - 'M','i','c','r','o','s','o','f','t','\', - 'I','n','t','e','r','n','e','t',' ', - 'E','x','p','l','o','r','e','r','\', - 'T','o','o','l','b','a','r',0};
if(SHRegOpenUSKeyW(toolbar_key, KEY_READ, NULL, &toolbar_handle, TRUE) == ERROR_SUCCESS) { + static const WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\', + 'C','l','a','s','s','e','s','\','C','L','S','I','D',0}; HUSKEY classes_handle; - WCHAR classes_key[] = {'S','o','f','t','w','a','r','e','\', - 'C','l','a','s','s','e','s','\','C','L','S','I','D',0}; WCHAR guid[39]; DWORD value_len = ARRAY_SIZE(guid); int i;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/jscript/compile.c | 2 +- dlls/jscript/json.c | 2 +- dlls/jscript/jsutils.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 5e844ee6e4..3f9db7a179 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -693,7 +693,7 @@ static HRESULT compile_delete_expression(compiler_ctx_t *ctx, unary_expression_t case EXPR_IDENT: return push_instr_bstr(ctx, OP_delete_ident, ((identifier_expression_t*)expr->expression)->identifier); default: { - const WCHAR fixmeW[] = {'F','I','X','M','E',0}; + static const WCHAR fixmeW[] = {'F','I','X','M','E',0};
WARN("invalid delete, unimplemented exception message\n");
diff --git a/dlls/jscript/json.c b/dlls/jscript/json.c index 0267340ca4..d440543690 100644 --- a/dlls/jscript/json.c +++ b/dlls/jscript/json.c @@ -487,7 +487,7 @@ static HRESULT json_quote(stringify_ctx_t *ctx, const WCHAR *ptr, size_t len) break; default: if(*ptr < ' ') { - const WCHAR formatW[] = {'\','u','%','0','4','x',0}; + static const WCHAR formatW[] = {'\','u','%','0','4','x',0}; WCHAR buf[7]; sprintfW(buf, formatW, *ptr); if(!append_string(ctx, buf)) diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 72dd4dbe9c..b612e65d7b 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -718,7 +718,7 @@ static jsstr_t *int_to_string(int i)
HRESULT double_to_string(double n, jsstr_t **str) { - const WCHAR InfinityW[] = {'-','I','n','f','i','n','i','t','y',0}; + static const WCHAR InfinityW[] = {'-','I','n','f','i','n','i','t','y',0};
if(isnan(n)) { *str = jsstr_nan(); @@ -748,9 +748,9 @@ HRESULT double_to_string(double n, jsstr_t **str) /* ECMA-262 3rd Edition 9.8 */ HRESULT to_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str) { - const WCHAR nullW[] = {'n','u','l','l',0}; - const WCHAR trueW[] = {'t','r','u','e',0}; - const WCHAR falseW[] = {'f','a','l','s','e',0}; + static const WCHAR nullW[] = {'n','u','l','l',0}; + static const WCHAR trueW[] = {'t','r','u','e',0}; + static const WCHAR falseW[] = {'f','a','l','s','e',0};
switch(jsval_type(val)) { case JSV_UNDEFINED:
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/midimap/midimap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c index 290300a55a..540dac3c76 100644 --- a/dlls/midimap/midimap.c +++ b/dlls/midimap/midimap.c @@ -553,9 +553,9 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, */ static LRESULT MIDIMAP_drvOpen(void) { + static const WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0}; MIDIOUTCAPSW moc; unsigned dev, i; - WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0}; BOOL found_valid_port = FALSE;
if (midiOutPorts)
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Fri, Nov 30, 2018 at 12:14:08AM -0700, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/midimap/midimap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c index 290300a55a..540dac3c76 100644 --- a/dlls/midimap/midimap.c +++ b/dlls/midimap/midimap.c @@ -553,9 +553,9 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, */ static LRESULT MIDIMAP_drvOpen(void) {
- static const WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0}; MIDIOUTCAPSW moc; unsigned dev, i;
WCHAR throughportW[] = {'M','i','d','i',' ','T','h','r','o','u','g','h',0}; BOOL found_valid_port = FALSE;
if (midiOutPorts)
-- 2.19.2
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/mscms/profile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index 039a271482..a0b9d4133d 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -668,9 +668,10 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
static BOOL header_from_file( LPCWSTR file, PPROFILEHEADER header ) { + static const WCHAR slash[] = {'\',0}; BOOL ret; PROFILE profile; - WCHAR path[MAX_PATH], slash[] = {'\',0}; + WCHAR path[MAX_PATH]; DWORD size = sizeof(path); HANDLE handle;
@@ -953,8 +954,8 @@ exit: BOOL WINAPI EnumColorProfilesW( PCWSTR machine, PENUMTYPEW record, PBYTE buffer, PDWORD size, PDWORD number ) { + static const WCHAR spec[] = {'\','*','i','c','m',0}; BOOL match, ret = FALSE; - WCHAR spec[] = {'\','*','i','c','m',0}; WCHAR colordir[MAX_PATH], glob[MAX_PATH], **profiles = NULL; DWORD i, len = sizeof(colordir), count = 0, totalsize = 0; PROFILEHEADER header;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/mscoree/metahost.c | 4 ++-- dlls/mscoree/mscoree_main.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 0f88b0fe69..422ca3112b 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -446,8 +446,8 @@ static HRESULT WINAPI CLRRuntimeInfo_GetVersionString(ICLRRuntimeInfo* iface,
static BOOL get_install_root(LPWSTR install_dir) { - const WCHAR dotnet_key[] = {'S','O','F','T','W','A','R','E','\','M','i','c','r','o','s','o','f','t','\','.','N','E','T','F','r','a','m','e','w','o','r','k','\',0}; - const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0}; + static const WCHAR dotnet_key[] = {'S','O','F','T','W','A','R','E','\','M','i','c','r','o','s','o','f','t','\','.','N','E','T','F','r','a','m','e','w','o','r','k','\',0}; + static const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0};
DWORD len; HKEY key; diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 5612ff6b89..234afe45ef 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -72,8 +72,8 @@ char *WtoA(LPCWSTR wstr)
static BOOL get_install_root(LPWSTR install_dir) { - const WCHAR dotnet_key[] = {'S','O','F','T','W','A','R','E','\','M','i','c','r','o','s','o','f','t','\','.','N','E','T','F','r','a','m','e','w','o','r','k','\',0}; - const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0}; + static const WCHAR dotnet_key[] = {'S','O','F','T','W','A','R','E','\','M','i','c','r','o','s','o','f','t','\','.','N','E','T','F','r','a','m','e','w','o','r','k','\',0}; + static const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0};
DWORD len; HKEY key; @@ -564,7 +564,7 @@ BOOL WINAPI StrongNameSignatureVerificationEx(LPCWSTR filename, BOOL forceVerifi
HRESULT WINAPI CreateDebuggingInterfaceFromVersion(int nDebugVersion, LPCWSTR version, IUnknown **ppv) { - const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0}; + static const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0}; HRESULT hr = E_FAIL; ICLRRuntimeInfo *runtimeinfo;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/mshtml/htmllocation.c | 2 +- dlls/mshtml/htmlstyle.c | 2 +- dlls/mshtml/navigate.c | 2 +- dlls/mshtml/script.c | 6 +++--- dlls/mshtml/txtrange.c | 2 +- dlls/mshtml/view.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index 769951643c..4b8a07a6e6 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -350,7 +350,7 @@ static HRESULT WINAPI HTMLLocation_get_host(IHTMLLocation *iface, BSTR *p)
if(url.nPort) { /* <hostname>:<port> */ - const WCHAR format[] = {'%','u',0}; + static const WCHAR format[] = {'%','u',0}; DWORD len, port_len; WCHAR portW[6]; WCHAR *buf; diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 20930aa9ed..7b823499ac 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -1160,8 +1160,8 @@ static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR ex
static inline HRESULT set_style_pos(HTMLStyle *This, styleid_t sid, float value) { + static const WCHAR szFormat[] = {'%','.','0','f','p','x',0}; WCHAR szValue[25]; - WCHAR szFormat[] = {'%','.','0','f','p','x',0};
value = floor(value);
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index f331cfdef5..286c4e20d5 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -2067,7 +2067,7 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri) nsresult nsres; HRESULT hres;
- const WCHAR selector_formatW[] = {'a','[','i','d','=','"','%','s','"',']',0}; + static const WCHAR selector_formatW[] = {'a','[','i','d','=','"','%','s','"',']',0};
set_current_uri(window, uri);
diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index d7b4e92310..de2bb7f2d4 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -1171,11 +1171,11 @@ static GUID get_default_script_guid(HTMLInnerWindow *window)
static BOOL get_guid_from_type(LPCWSTR type, GUID *guid) { - const WCHAR text_javascriptW[] = + static const WCHAR text_javascriptW[] = {'t','e','x','t','/','j','a','v','a','s','c','r','i','p','t',0}; - const WCHAR text_jscriptW[] = + static const WCHAR text_jscriptW[] = {'t','e','x','t','/','j','s','c','r','i','p','t',0}; - const WCHAR text_vbscriptW[] = + static const WCHAR text_vbscriptW[] = {'t','e','x','t','/','v','b','s','c','r','i','p','t',0};
/* FIXME: Handle more types */ diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index 8b12c018ab..bfabbf40e7 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -938,7 +938,7 @@ static HRESULT WINAPI HTMLTxtRange_get_htmlText(IHTMLTxtRange *iface, BSTR *p) }
if(!*p) { - const WCHAR emptyW[] = {0}; + static const WCHAR emptyW[] = {0}; *p = SysAllocString(emptyW); }
diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c index 442b07d89a..9d4f40467b 100644 --- a/dlls/mshtml/view.c +++ b/dlls/mshtml/view.c @@ -100,8 +100,8 @@ void update_title(HTMLDocumentObj *This)
hres = IOleClientSite_QueryInterface(This->client, &IID_IOleCommandTarget, (void**)&olecmd); if(SUCCEEDED(hres)) { + static const WCHAR empty[] = {0}; VARIANT title; - WCHAR empty[] = {0};
V_VT(&title) = VT_BSTR; V_BSTR(&title) = SysAllocString(empty);
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/msi/action.c | 4 ++-- dlls/msi/database.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 8ae9dce57a..9407d36520 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -160,7 +160,7 @@ static const WCHAR szINSTALL[] =
static INT ui_actionstart(MSIPACKAGE *package, LPCWSTR action, LPCWSTR description, LPCWSTR template) { - WCHAR query[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', + static const WCHAR query[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','A','c','t','i','o','n','T','e','x','t','`',' ','W','H','E','R','E',' ', '`','A','c','t','i','o','n','`',' ','=',' ',''','%','s',''',0}; MSIRECORD *row, *textrow; @@ -3546,7 +3546,7 @@ static WCHAR *build_full_keypath( MSIPACKAGE *package, MSICOMPONENT *comp ) { if (comp->assembly) { - const WCHAR prefixW[] = {'<','\',0}; + static const WCHAR prefixW[] = {'<','\',0}; DWORD len = strlenW( prefixW ) + strlenW( comp->assembly->display_name ); WCHAR *keypath = msi_alloc( (len + 1) * sizeof(WCHAR) );
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index c1fb37b583..b8ec39322b 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1333,7 +1333,7 @@ static LPWSTR get_key_value(MSIQUERY *view, LPCWSTR key, MSIRECORD *rec) if (MSI_RecordGetString(rec, i)) /* check record field is a string */ { /* quote string record fields */ - const WCHAR szQuote[] = {''', 0}; + static const WCHAR szQuote[] = {''', 0}; sz += 2; val = msi_alloc(sz*sizeof(WCHAR)); if (!val)
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/netapi32/netapi32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c index afeada6f1e..c765f36ea8 100644 --- a/dlls/netapi32/netapi32.c +++ b/dlls/netapi32/netapi32.c @@ -2298,8 +2298,8 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level, DWORD flags, LPBYTE* bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries) { + static const WCHAR admins[] = {'A','d','m','i','n','i','s','t','r','a','t','o','r','s',0}; NET_API_STATUS status; - const WCHAR admins[] = {'A','d','m','i','n','i','s','t','r','a','t','o','r','s',0}; LPWSTR currentuser; LOCALGROUP_USERS_INFO_0* info; DWORD size;
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 81731ce355..2b3b2ec0ef 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -1371,15 +1371,15 @@ static NTSTATUS create_device_symlink( DEVICE_OBJECT *device, UNICODE_STRING *sy */ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable ) { - const WCHAR DeviceClassesW[] = {'\','R','E','G','I','S','T','R','Y','\', + static const WCHAR DeviceClassesW[] = {'\','R','E','G','I','S','T','R','Y','\', 'M','a','c','h','i','n','e','\','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','\', 'D','e','v','i','c','e','C','l','a','s','s','e','s','\',0}; - const WCHAR controlW[] = {'C','o','n','t','r','o','l',0}; - const WCHAR linkedW[] = {'L','i','n','k','e','d',0}; - const WCHAR slashW[] = {'\',0}; - const WCHAR hashW[] = {'#',0}; + static const WCHAR controlW[] = {'C','o','n','t','r','o','l',0}; + static const WCHAR linkedW[] = {'L','i','n','k','e','d',0}; + static const WCHAR slashW[] = {'\',0}; + static const WCHAR hashW[] = {'#',0};
size_t namelen = name->Length / sizeof(WCHAR); DEV_BROADCAST_DEVICEINTERFACE_W *broadcast;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45252
Your paranoid android.
=== debian9 (32 bit report) ===
ntoskrnl.exe: driver.c:457: Test failed: got 0
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/oleaut32/vartype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index e2df87328c..067d515e34 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -6522,7 +6522,7 @@ static HRESULT VARIANT_BstrFromReal(DOUBLE dblIn, LCID lcid, ULONG dwFlags, */ if (buff[0] == '-') { - const WCHAR szAccept[] = {'0', '.', '\0'}; + static const WCHAR szAccept[] = {'0', '.', '\0'}; if (strlenW(buff + 1) == strspnW(buff + 1, szAccept)) { buff[0] = '0'; buff[1] = '\0'; } }
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/oledb32/convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/oledb32/convert.c b/dlls/oledb32/convert.c index 5bad105582..971e6d90a7 100644 --- a/dlls/oledb32/convert.c +++ b/dlls/oledb32/convert.c @@ -619,7 +619,7 @@ static HRESULT WINAPI convert_DataConvert(IDataConvert* iface, { WCHAR szBuff[39]; const GUID *id = (const GUID *)src; - WCHAR format[] = { + static const WCHAR format[] = { '{','%','0','8','X','-','%','0','4','X','-','%','0','4','X','-', '%','0','2','X','%','0','2','X','-', '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X','}',0};
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/riched20/editor.c | 4 ++-- dlls/riched20/paint.c | 4 ++-- dlls/riched20/para.c | 2 +- dlls/riched20/run.c | 2 +- dlls/riched20/table.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 052400c99f..99c87bf61d 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2520,11 +2520,11 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
if (editor->styleFlags & ES_MULTILINE) { + static const WCHAR endl = '\r'; + static const WCHAR endlv10[] = {'\r','\n'}; ME_Cursor cursor = editor->pCursors[0]; ME_DisplayItem *para = cursor.pPara; int from, to; - const WCHAR endl = '\r'; - const WCHAR endlv10[] = {'\r','\n'}; ME_Style *style, *eop_style;
if (editor->styleFlags & ES_READONLY) { diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 44cf3cbe78..e2ccef4fbf 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -989,7 +989,7 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) } if (me_debug) { - const WCHAR wszRowDebug[] = {'r','o','w','[','%','d',']',0}; + static const WCHAR wszRowDebug[] = {'r','o','w','[','%','d',']',0}; WCHAR buf[128]; POINT pt = c->pt; wsprintfW(buf, wszRowDebug, no); @@ -1017,7 +1017,7 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) c->pt.y + para->pt.y + run->pt.y + baseline, p, para); if (me_debug) { - const WCHAR wszRunDebug[] = {'[','%','d',':','%','x',']',' ','%','l','s',0}; + static const WCHAR wszRunDebug[] = {'[','%','d',':','%','x',']',' ','%','l','s',0}; WCHAR buf[2560]; POINT pt; pt.x = c->pt.x + run->pt.x; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index c4ddb65d4e..7781ff2dce 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -152,6 +152,7 @@ void add_marked_para(ME_TextEditor *editor, ME_DisplayItem *di)
void ME_MakeFirstParagraph(ME_TextEditor *editor) { + static const WCHAR cr_lf[] = {'\r','\n',0}; ME_Context c; CHARFORMAT2W cf; const CHARFORMATW *host_cf; @@ -162,7 +163,6 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) ME_DisplayItem *run; ME_Style *style; int eol_len; - WCHAR cr_lf[] = {'\r','\n',0};
ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 2cdd3d804a..66c24f88b7 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -612,8 +612,8 @@ int ME_PointFromChar(ME_TextEditor *editor, ME_Run *pRun, int nOffset, BOOL visu SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, int nLen, int startx, int *pAscent, int *pDescent) { + static const WCHAR spaceW[] = {' ',0}; SIZE size; - WCHAR spaceW[] = {' ',0};
nLen = min( nLen, run->len );
diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index 4cd77eb399..7e8d7ffacb 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -56,6 +56,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(richedit_lists);
+static const WCHAR cr_lf[] = {'\r', '\n', 0}; + static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor, int nCursor, const WCHAR *eol_str, int eol_len, @@ -77,7 +79,6 @@ static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor, ME_DisplayItem* ME_InsertTableRowStartFromCursor(ME_TextEditor *editor) { ME_DisplayItem *para; - WCHAR cr_lf[] = {'\r', '\n', 0}; para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWSTART); return para->member.para.prev_para; } @@ -128,7 +129,6 @@ ME_DisplayItem* ME_InsertTableCellFromCursor(ME_TextEditor *editor) ME_DisplayItem* ME_InsertTableRowEndFromCursor(ME_TextEditor *editor) { ME_DisplayItem *para; - WCHAR cr_lf[] = {'\r', '\n', 0}; para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWEND); return para->member.para.prev_para; }
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/secur32/secur32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index ec189fda10..b3ab80a850 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -1001,8 +1001,8 @@ BOOLEAN WINAPI GetComputerObjectNameW( DWORD len = domainInfo->Name.Length + size + 3; if (lpNameBuffer && *nSize >= len) { - WCHAR bs[] = { '\', 0 }; - WCHAR ds[] = { '$', 0 }; + static const WCHAR bs[] = { '\', 0 }; + static const WCHAR ds[] = { '$', 0 }; if (domainInfo->Name.Buffer) { lstrcpyW(lpNameBuffer, domainInfo->Name.Buffer);
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/setupapi/devinst.c | 6 +++--- dlls/setupapi/install.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index ae7a575302..b3d7099236 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -259,7 +259,7 @@ static void SETUPDI_GuidToString(const GUID *guid, LPWSTR guidStr)
static WCHAR *get_iface_key_path(struct device_iface *iface) { - const WCHAR slashW[] = {'\',0}; + static const WCHAR slashW[] = {'\',0}; WCHAR *path, *ptr; size_t len = strlenW(DeviceClasses) + 1 + 38 + 1 + strlenW(iface->symlink);
@@ -286,8 +286,8 @@ static WCHAR *get_iface_key_path(struct device_iface *iface)
static WCHAR *get_refstr_key_path(struct device_iface *iface) { - const WCHAR hashW[] = {'#',0}; - const WCHAR slashW[] = {'\',0}; + static const WCHAR hashW[] = {'#',0}; + static const WCHAR slashW[] = {'\',0}; WCHAR *path, *ptr; size_t len = strlenW(DeviceClasses) + 1 + 38 + 1 + strlenW(iface->symlink) + 1 + 1;
diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 1453f52247..2e9359cd83 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -1598,7 +1598,7 @@ BOOL WINAPI SetupGetInfFileListW(PCWSTR dir, DWORD style, PWSTR buffer, } else { - WCHAR infdir[] = {'\','i','n','f',0 }; + static const WCHAR infdir[] = {'\','i','n','f',0}; DWORD msize; dir_len = GetWindowsDirectoryW( NULL, 0 ); msize = ( 7 + 4 + dir_len ) * sizeof( WCHAR );