Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48628 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/riched20/editor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index c4a6902733..29e17180d4 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -416,10 +416,8 @@ static void ME_ApplyBorderProperties(RTF_Info *info,
void ME_RTFCharAttrHook(RTF_Info *info) { - CHARFORMAT2W fmt; + CHARFORMAT2W fmt = {0}; fmt.cbSize = sizeof(fmt); - fmt.dwMask = 0; - fmt.dwEffects = 0;
switch(info->rtfMinor) { -- 2.25.1
On 2/19/20 5:26 PM, Fabian Maurer wrote:
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48628 Signed-off-by: Fabian Maurer dark.shadow4@web.de
dlls/riched20/editor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index c4a6902733..29e17180d4 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -416,10 +416,8 @@ static void ME_ApplyBorderProperties(RTF_Info *info,
void ME_RTFCharAttrHook(RTF_Info *info) {
- CHARFORMAT2W fmt;
- CHARFORMAT2W fmt = {0}; fmt.cbSize = sizeof(fmt);
fmt.dwMask = 0;
fmt.dwEffects = 0;
switch(info->rtfMinor) {
-- 2.25.1
While this will silence the warning, which case is the problem? It could indicate actual issue somewhere else in the code, when mask is set for uninitialized field, or field is used with mask unset.
Hello Nicolay,
thanks for your comment.
While this will silence the warning, which case is the problem? It could indicate actual issue somewhere else in the code, when mask is set for uninitialized field, or field is used with mask unset.
The problem is that szFacename is an array inside the struct, and the struct gets compared against another struct. Since the array is never 100% full, that means we compare all the garbage in the array as well. I adjusted the patch to make it more clear.
Regards, Fabian Maurer