This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Silence Win32 compiler warning
authorKarl Williamson <khw@cpan.org>
Wed, 14 Mar 2018 14:39:59 +0000 (08:39 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 14 Mar 2018 15:06:33 +0000 (09:06 -0600)
The return value is discarded here, and a few lines down calls this
function again, retaining its return value.

locale.c

index 98d6d37..cfbc056 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -2578,8 +2578,8 @@ S_my_nl_langinfo(const int item, bool toggle)
 
                     /* Here everything past the dot is a digit.  Treat it as a
                      * code page */
-                    save_to_buffer("CP", &PL_langinfo_buf,
-                                         &PL_langinfo_bufsize, 0);
+                    (void) save_to_buffer("CP", &PL_langinfo_buf,
+                                                &PL_langinfo_bufsize, 0);
                     offset = STRLENs("CP");
 
                   has_nondigit: