This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Silence compiler warnings
authorKarl Williamson <khw@cpan.org>
Thu, 15 Feb 2018 18:07:16 +0000 (11:07 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 16 Feb 2018 01:08:08 +0000 (18:08 -0700)
These are spurious warnings, from netbsd

utf8.c

diff --git a/utf8.c b/utf8.c
index 9cd4fa0..467e087 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -117,9 +117,9 @@ S_new_msg_hv(pTHX_ const char * const message, /* The message text */
 
     PERL_ARGS_ASSERT_NEW_MSG_HV;
 
-    hv_stores(msg_hv, "text", msg_sv);
-    hv_stores(msg_hv, "warn_categories",  category_sv);
-    hv_stores(msg_hv, "flag_bit", flag_bit_sv);
+    (void) hv_stores(msg_hv, "text", msg_sv);
+    (void) hv_stores(msg_hv, "warn_categories",  category_sv);
+    (void) hv_stores(msg_hv, "flag_bit", flag_bit_sv);
 
     return msg_hv;
 }
@@ -1560,7 +1560,7 @@ Perl_utf8n_to_uvchr_msgs(pTHX_ const U8 *s,
     const U8 * send = s0 + curlen;
     U32 possible_problems = 0;  /* A bit is set here for each potential problem
                                    found as we go along */
-    UV uv;
+    UV uv = (UV) -1;
     STRLEN expectlen   = 0;     /* How long should this sequence be?
                                    (initialized to silence compilers' wrong
                                    warning) */