This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
If we do not have vsnprintf, the len is unused.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 21 Jun 2014 12:05:08 +0000 (08:05 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 22 Jun 2014 21:51:26 +0000 (17:51 -0400)
util.c

diff --git a/util.c b/util.c
index 3175f1f..d81635d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -4921,6 +4921,9 @@ Perl_my_snprintf(char *buffer, const Size_t len, const char *format, ...)
     int retval;
     va_list ap;
     PERL_ARGS_ASSERT_MY_SNPRINTF;
+#ifndef HAS_VSNPRINTF
+    PERL_UNUSED_VAR(len);
+#endif
     va_start(ap, format);
 #ifdef HAS_VSNPRINTF
     retval = vsnprintf(buffer, len, format, ap);
@@ -4959,7 +4962,9 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap
     va_list apc;
 
     PERL_ARGS_ASSERT_MY_VSNPRINTF;
-
+#ifndef HAS_VSNPRINTF
+    PERL_UNUSED_VAR(len);
+#endif
     Perl_va_copy(ap, apc);
 # ifdef HAS_VSNPRINTF
     retval = vsnprintf(buffer, len, format, apc);