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: Thu, 18 Feb 2021 17:04:15 -0500

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 888a444  Fix compiler warnings.
888a444 is described below

commit 888a444100d048964d5a42fa2c8f780ba2fd7c8c
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Feb 18 22:04:07 2021 +0000

    Fix compiler warnings.
    
    * tp/Texinfo/XS/XSParagraph.xs (xspara_new): Remove code
    setting an unused variable.  It appears that we are not
    blessing the return value into a class after all.
    * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command):
    Parentheses around assignment in conditional.
    * tp/Texinfo/XS/parsetexi/input.c (text_buffer_iconv): Handle
    KOI8 cases in switch statement.
    * tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line):
    Remove unused label.
    
    Report from Per Bothner.
---
 ChangeLog                                 | 16 ++++++++++++++++
 tp/Texinfo/XS/XSParagraph.xs              |  4 +---
 tp/Texinfo/XS/parsetexi/handle_commands.c |  2 +-
 tp/Texinfo/XS/parsetexi/input.c           |  8 +++++++-
 tp/Texinfo/XS/parsetexi/macro.c           |  1 -
 5 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 114fab4..1874568 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2021-02-18  Gavin Smith  <gavinsmith0123@gmail.com>
 
+       Fix compiler warnings.
+       
+       * tp/Texinfo/XS/XSParagraph.xs (xspara_new): Remove code
+       setting an unused variable.  It appears that we are not
+       blessing the return value into a class after all.
+       * tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command):
+       Parentheses around assignment in conditional.
+       * tp/Texinfo/XS/parsetexi/input.c (text_buffer_iconv): Handle
+       KOI8 cases in switch statement.
+       * tp/Texinfo/XS/parsetexi/macro.c (parse_macro_command_line):
+       Remove unused label.
+
+       Report from Per Bothner.
+
+2021-02-18  Gavin Smith  <gavinsmith0123@gmail.com>
+
        Reform parsetexi header files
 
        * tp/Texinfo/XS/parsetexi: Make header files include the other
diff --git a/tp/Texinfo/XS/XSParagraph.xs b/tp/Texinfo/XS/XSParagraph.xs
index d1953f3..9c17032 100644
--- a/tp/Texinfo/XS/XSParagraph.xs
+++ b/tp/Texinfo/XS/XSParagraph.xs
@@ -46,7 +46,6 @@ SV *
 xspara_new (class, ...)
         SV * class
     PREINIT:
-        HV *pkg;
         HV *conf = 0;
         int id;
     CODE:
@@ -58,9 +57,8 @@ xspara_new (class, ...)
           }
         id = xspara_new (conf);
 
-        /* Create a blessed integer, which the other functions
+        /* Create an integer, which the other functions
            need as their first argument. */
-        pkg = gv_stashpv ("Texinfo::Convert::Paragraph", 0);
         RETVAL = newSViv (id);
     OUTPUT:
         RETVAL
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c 
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index 4a34d6c..fa3ce13 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -530,7 +530,7 @@ handle_line_command (ELEMENT *current, char **line_inout,
       if (cmd == CM_item_LINE || cmd == CM_itemx)
         {
           ELEMENT *parent;
-          if (parent = item_line_parent (current))
+          if ((parent = item_line_parent (current)))
             {
               debug ("ITEM_LINE");
               current = parent;
diff --git a/tp/Texinfo/XS/parsetexi/input.c b/tp/Texinfo/XS/parsetexi/input.c
index 67309c2..f97edbf 100644
--- a/tp/Texinfo/XS/parsetexi/input.c
+++ b/tp/Texinfo/XS/parsetexi/input.c
@@ -169,7 +169,7 @@ text_buffer_iconv (TEXT *buf, iconv_t iconv_state,
 static char *
 convert_to_utf8 (char *s)
 {
-  iconv_t our_iconv;
+  iconv_t our_iconv = (iconv_t) -1;
   static TEXT t;
   ICONV_CONST char *inptr; size_t bytes_left;
   size_t iconv_ret;
@@ -215,6 +215,12 @@ convert_to_utf8 (char *s)
     case ce_shiftjis:
       our_iconv = iconv_from_shiftjis;
       break;
+    case ce_koi8r:
+      our_iconv = iconv_from_koi8r;
+      break;
+    case ce_koi8u:
+      our_iconv = iconv_from_koi8u;
+      break;
     }
 
   if (our_iconv == (iconv_t) -1)
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 79fc9f0..292e4cc 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -207,7 +207,6 @@ check_trailing:
     }
   //line += strlen (line); /* Discard rest of line. */
 
-funexit:
   *line_inout = line;
   return macro;
 }



reply via email to

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