[PATCH 0/1] MR4561: localspl: Fix a maybe-uninitialized warning in fill_builtin_form_info().
From: Aida Jonikienė <aidas957(a)gmail.com> --- dlls/localspl/provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c index 26e9c66bea0..0fa0e711983 100644 --- a/dlls/localspl/provider.c +++ b/dlls/localspl/provider.c @@ -3072,7 +3072,7 @@ static void fill_builtin_form_info( BYTE **base, WCHAR **strings, const struct b DWORD size, DWORD *used ) { FORM_INFO_2W *info = *(FORM_INFO_2W**)base; - DWORD name_len = wcslen( form->name ) + 1, res_len = 0, keyword_len, total_size; + DWORD name_len = wcslen( form->name ) + 1, res_len = 0, keyword_len = 0, total_size; static const WCHAR dll_name[] = L"localspl.dll"; const WCHAR *resource; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4561
This doesn't look necessary, the variable is only briefly used in a scope and doesn't seem to be possible to be used uninitialized? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561#note_59118
On Fri Jan 26 08:34:06 2024 +0000, Rémi Bernon wrote:
This doesn't look necessary, the variable is only briefly used in a scope and doesn't seem to be possible to be used uninitialized? MinGW GCC 13.1.0 on my Arch Linux system is complaining about this warning and so I have to fix it to make Wine compile with -Werror (this is the final warning in the upstream code so far; the rest are inside staging which I already prepared patches for but haven't sent them yet)
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561#note_59124
On Fri Jan 26 08:34:06 2024 +0000, Aida Jonikienė wrote:
MinGW GCC 13.1.0 on my Arch Linux system is complaining about this warning and so I have to fix it to make Wine compile with -Werror (this is the final warning in the upstream code so far; the rest are inside staging which I already prepared patches for but haven't sent them yet) Move the variable declaration inside the scope perhaps then?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561#note_59126
On Fri Jan 26 09:17:58 2024 +0000, Rémi Bernon wrote:
Move the variable declaration inside the scope perhaps then? The `res_len` variable got the same initialization to 0 treatment in !1960 so I'm not sure :frog:
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561#note_59129
On Fri Jan 26 09:32:36 2024 +0000, Aida Jonikienė wrote:
The `res_len` variable got the same initialization to 0 treatment in !1960 so I'm not sure :frog: Oh yeah sorry it's actually used below, my search was not highlighting it for some reason.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561#note_59131
This merge request was approved by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4561
participants (3)
-
Aida Jonikienė -
Huw Davies (@huw) -
Rémi Bernon