From: Bartosz Kosiorek gang65@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'; } }
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.
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.
This merge request was closed by Bartosz Kosiorek.