bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some suspicious snippet in the parsetexi code


From: Gavin Smith
Subject: Re: Some suspicious snippet in the parsetexi code
Date: Sun, 2 Feb 2020 13:03:37 +0000

On Sun, Feb 2, 2020 at 12:07 PM Hans-Bernhard Bröker
<address@hidden> wrote:
>
> Hello Gavin,
>
> I've been going over the code to reduce the number of compiler warnings
> a bit, and in doing so, I came across what looks like an almost certain bug:
>
> diff --git a/tp/Texinfo/XS/parsetexi/separator.c
> b/tp/Texinfo/XS/parsetexi/separator.c
> index 639cc908d..c872ca599 100644
> --- a/tp/Texinfo/XS/parsetexi/separator.c
> +++ b/tp/Texinfo/XS/parsetexi/separator.c
> @@ -475,7 +475,7 @@ handle_close_brace (ELEMENT *current, char **line_inout)
>             int superfluous_arg;
>             char *arg = convert_to_text (current, &superfluous_arg);
>
> -          if (arg && *arg);
> +          if (arg && *arg)
>               {
>                 ELEMENT *index_elt;
>                 if (current->parent->parent
>
> That extraneous semicolon renders that if() meaningless.  There's no way
> that code could have been meant the way it's written.

You are right.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]