[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/xspara.c (xspara_add_text, xspara
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/XS/xspara.c (xspara_add_text, xspara__add_next): Cast char * to uint8_t * when calling u8_mbtouc to avoid a compiler warning. This is valid as we know the strings we are getting from Perl are UTF-8 encoded. (xspara_add_text): Avoid a warning about a variable possibly being undefined. |
Date: |
Wed, 15 Nov 2023 16:50:05 -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 87310b9380 * tp/Texinfo/XS/xspara.c (xspara_add_text,
xspara__add_next): Cast char * to uint8_t * when calling u8_mbtouc to avoid a
compiler warning. This is valid as we know the strings we are getting from
Perl are UTF-8 encoded. (xspara_add_text): Avoid a warning about a variable
possibly being undefined.
87310b9380 is described below
commit 87310b938020f1e7b2e67f5722956667c6ae4e8a
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Nov 15 21:49:34 2023 +0000
* tp/Texinfo/XS/xspara.c (xspara_add_text, xspara__add_next):
Cast char * to uint8_t * when calling u8_mbtouc to avoid a
compiler warning. This is valid as we know the strings we are
getting from Perl are UTF-8 encoded.
(xspara_add_text): Avoid a warning about a variable possibly
being undefined.
---
ChangeLog | 9 +++++++++
tp/Texinfo/XS/xspara.c | 9 +++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0b99b6549a..b368e07bc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-11-15 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/XS/xspara.c (xspara_add_text, xspara__add_next):
+ Cast char * to uint8_t * when calling u8_mbtouc to avoid a
+ compiler warning. This is valid as we know the strings we are
+ getting from Perl are UTF-8 encoded.
+ (xspara_add_text): Avoid a warning about a variable possibly
+ being undefined.
+
2023-11-15 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (TYPE_INTERNAL_CONVERSION)
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index 09a2ac2d77..faadc0c826 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -636,7 +636,7 @@ xspara__add_next (TEXT *result, char *word, int word_len,
after_punctuation_characters, *p))
{
char32_t wc;
- u8_mbtouc (&wc, p, len);
+ u8_mbtouc (&wc, (uint8_t *) p, len);
state.last_letter = wc;
break;
}
@@ -673,7 +673,7 @@ xspara__add_next (TEXT *result, char *word, int word_len,
continue;
}
- char_len = u8_mbtouc (&w, p, left);
+ char_len = u8_mbtouc (&w, (uint8_t *) p, left);
if (char_len == (size_t) -2) {
/* unfinished multibyte character */
char_len = left;
@@ -796,7 +796,7 @@ TEXT
xspara_add_text (char *text, int len)
{
char *p = text, *q = 0;
- char32_t wc, wc_fw;
+ char32_t wc_fw = (char32_t) '0';
size_t next_len = 0;
int width;
static TEXT result;
@@ -859,7 +859,8 @@ xspara_add_text (char *text, int len)
}
else
{
- next_len = u8_mbtouc (&wc, q, len);
+ char32_t wc;
+ next_len = u8_mbtouc (&wc, (uint8_t *) q, len);
if ((long) next_len == 0)
break; /* Null character. Shouldn't happen. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/xspara.c (xspara_add_text, xspara__add_next): Cast char * to uint8_t * when calling u8_mbtouc to avoid a compiler warning. This is valid as we know the strings we are getting from Perl are UTF-8 encoded. (xspara_add_text): Avoid a warning about a variable possibly being undefined.,
Gavin D. Smith <=
- Prev by Date:
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (TYPE_INTERNAL_CONVERSION) (types_internal_conversion_table, convert_table_term_type) (html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (enum formatting_reference_status): add types_internal_conversion_table where type conversion implemented in C is registered, use it to replace type_conversion function. Implement convert_table_term_type as a type conversion function.
- Next by Date:
branch master updated: * doc/texi2any_api.texi (Conversion in Preformatted Context), tp/Texinfo/Convert/HTML.pm (in_preformatted_context), tp/Texinfo/Convert/HTML.pm (inside_preformatted): rename in_preformatted as in_preformatted_context and _in_preformatted_in_menu as inside_preformatted.
- Previous by thread:
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (TYPE_INTERNAL_CONVERSION) (types_internal_conversion_table, convert_table_term_type) (html_converter_initialize), tp/Texinfo/XS/main/converter_types.h (enum formatting_reference_status): add types_internal_conversion_table where type conversion implemented in C is registered, use it to replace type_conversion function. Implement convert_table_term_type as a type conversion function.
- Next by thread:
branch master updated: * doc/texi2any_api.texi (Conversion in Preformatted Context), tp/Texinfo/Convert/HTML.pm (in_preformatted_context), tp/Texinfo/Convert/HTML.pm (inside_preformatted): rename in_preformatted as in_preformatted_context and _in_preformatted_in_menu as inside_preformatted.
- Index(es):