[PATCH] riched20: Add more warnings for unhandled control words.

Huw Davies huw at codeweavers.com
Wed Sep 13 02:44:08 CDT 2017


On Tue, Sep 12, 2017 at 09:43:10AM -0500, Zebediah Figura wrote:
> Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
> ---
>  dlls/riched20/editor.c |  6 ++++++
>  dlls/riched20/reader.c | 15 +++++++++++++--
>  2 files changed, 19 insertions(+), 2 deletions(-)
> 
> diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
> index a7b1bc748f..f6badb1a36 100644
> --- a/dlls/riched20/editor.c
> +++ b/dlls/riched20/editor.c
> @@ -533,6 +533,8 @@ void ME_RTFCharAttrHook(RTF_Info *info)
>        if (info->rtfParam != rtfNoParam)
>          fmt.yHeight = info->rtfParam*10;
>        break;
> +    default:
> +      WARN("unknown token \"%s\"\n", info->rtfTextBuf);

These should be FIXME()s not WARN()s.
It would also be better to use debugstr_a() on the string.

> @@ -2450,7 +2454,10 @@ static void
>  Destination (RTF_Info *info)
>  {
>  	if (!RTFGetDestinationCallback(info, info->rtfMinor))
> +        {
> +                WARN("unknown token \"%s\"\n", info->rtfTextBuf);
>  		RTFSkipGroup (info);    
> +        }
>  }

Now would be a good opportunity to get rid of the tabs from
this function.

Huw.



More information about the wine-devel mailing list