texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Fix compiler warnings


From: Gavin D. Smith
Subject: branch master updated: Fix compiler warnings
Date: Wed, 19 Oct 2022 11:14:02 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new d488d025ef Fix compiler warnings
d488d025ef is described below

commit d488d025efd6883b81256735795f9e5adae54bc9
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Oct 19 16:13:54 2022 +0100

    Fix compiler warnings
    
    * tp/Texinfo/XS/parsetexi/end_line.c
    (end_line_misc_line): Initialise a variable to make it clearer
    that it is not used uninitialised.
    * tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal):
    Move a declaration to the start of a block.
---
 ChangeLog                          | 10 ++++++++++
 tp/Texinfo/XS/parsetexi/end_line.c |  2 +-
 tp/Texinfo/XS/parsetexi/parser.c   |  3 ++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3d1f59925f..81c1ab811e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-10-19  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Fix compiler warnings
+
+       * tp/Texinfo/XS/parsetexi/end_line.c
+       (end_line_misc_line): Initialise a variable to make it clearer
+       that it is not used uninitialised.
+       * tp/Texinfo/XS/parsetexi/parser.c (isolate_last_space_internal):
+       Move a declaration to the start of a block.
+
 2022-10-19  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Fix compiler warnings
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c 
b/tp/Texinfo/XS/parsetexi/end_line.c
index 9e2304066f..87ca036edd 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -1302,7 +1302,7 @@ end_line_misc_line (ELEMENT *current)
   int arg_type;
   ELEMENT *misc_cmd;
   char *end_command = 0;
-  enum command_id end_id;
+  enum command_id end_id = CM_NONE;
   int included_file = 0;
 
   isolate_last_space (current);
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 2573560053..e0b18b35bb 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -661,11 +661,12 @@ isolate_last_space_internal (ELEMENT *current)
 {
   ELEMENT *last_elt;
   char *text;
+  int text_len;
 
   last_elt = last_contents_child (current);
   text = element_text (last_elt);
 
-  int text_len = last_elt->text.end;
+  text_len = last_elt->text.end;
 
   /* If text all whitespace */
   if (text[strspn (text, whitespace_chars)] == '\0')



reply via email to

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