[Top][All Lists]

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

Some suspicious snippet in the parsetexi code

From: Hans-Bernhard Bröker
Subject: Some suspicious snippet in the parsetexi code
Date: Sun, 2 Feb 2020 13:07:04 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2

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.

reply via email to

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