[PATCH 0/1] MR4391: mshtml: Fix misleading-indentation warning.
From: Bartosz Kosiorek <gang65(a)poczta.onet.pl> --- dlls/mshtml/mshtml_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 23e1decc68b..36d7ca3daee 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1440,7 +1440,7 @@ static inline char *strndupWtoU(const WCHAR *str, unsigned len) ret = malloc(size + 1); if(ret) { if(len) WideCharToMultiByte(CP_UTF8, 0, str, len, ret, size, NULL, NULL); - ret[size] = '\0'; + ret[size] = '\0'; } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4391
Gabriel Ivăncescu (@insn) commented about dlls/mshtml/mshtml_private.h:
ret = malloc(size + 1); if(ret) { if(len) WideCharToMultiByte(CP_UTF8, 0, str, len, ret, size, NULL, NULL); - ret[size] = '\0'; + ret[size] = '\0';
The `ret[size] = '\0'` statement is **not** part of the if condition, so adding indentation to it should *actually* cause a warning. Can you post the warning? This sounds like a compiler bug to me. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4391#note_52263
On Tue Nov 14 19:10:24 2023 +0000, Gabriel Ivăncescu wrote:
The `ret[size] = '\0'` statement is **not** part of the if condition, so adding indentation to it should *actually* cause a warning. Can you post the warning? This sounds like a compiler bug to me. I imagine this is trying to fix the warnings that can be seen in gitlab's build jobs. As you say, this isn't the correct fix.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4391#note_52342
This merge request was closed by Bartosz Kosiorek. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4391
participants (4)
-
Bartosz Kosiorek -
Bartosz Kosiorek (@gang65) -
Gabriel Ivăncescu -
Huw Davies (@huw)