summaryrefslogtreecommitdiff
path: root/gl/lib/vasnprintf.c.diff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-30 18:58:58 -0600
committerEric Blake <ebb9@byu.net>2009-11-02 06:34:24 -0700
commit8fe40b84bd8dbb0d1e908422eb68a17c9f254754 (patch)
tree3d69b802f17ea2957625a5bd8a58c0e8ff431631 /gl/lib/vasnprintf.c.diff
parent565e5f6827672bdc6510b8b5a839831ab097c5a1 (diff)
downloadcoreutils-8fe40b84bd8dbb0d1e908422eb68a17c9f254754.tar.xz
build: avoid some warnings
* gl/lib/mbsalign.c (mbsalign): Mark unused parameter. * bootstrap.conf (gnulib_modules): Remove obsolete rename-dest-slash. * gnulib-tests/Makefile.am (AM_CFLAGS): Reduce set of warnings for gnulib tests. * gl/modules/rename-tests.diff (Makefile.am): New file, to add LIBINTL to LDADD, since we avoid canonicalize-lgpl module. * gl/lib/regcomp.c.diff (regerror, calc_next) (build_collating_symbol, parse_bracket_element, build_equiv_class) (free_tree): Mark unused parameters. * gl/lib/regex_internal.h.diff (re_string_elem_size_at): New file, to mark unused parameters. * gl/lib/printf-args.c.diff (PRINTF_FETCHARGS): New file, to avoid type mismatch. * gl/lib/vasnprintf.c (VASNPRINTF): New file, to avoid shadowing local variable name. * .gitignore: Ignore temporary build artifacts.
Diffstat (limited to 'gl/lib/vasnprintf.c.diff')
-rw-r--r--gl/lib/vasnprintf.c.diff120
1 files changed, 120 insertions, 0 deletions
diff --git a/gl/lib/vasnprintf.c.diff b/gl/lib/vasnprintf.c.diff
new file mode 100644
index 000000000..eb48ab070
--- /dev/null
+++ b/gl/lib/vasnprintf.c.diff
@@ -0,0 +1,120 @@
+diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
+index 661445c..ab66288 100644
+--- a/lib/vasnprintf.c
++++ b/lib/vasnprintf.c
+@@ -2375,16 +2375,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ characters = 0;
+ while (precision > 0)
+ {
+- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
++ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+ # if HAVE_WCRTOMB
+- count = wcrtomb (buf, *arg_end, &state);
++ count = wcrtomb (cbuf, *arg_end, &state);
+ # else
+- count = wctomb (buf, *arg_end);
++ count = wctomb (cbuf, *arg_end);
+ # endif
+ if (count < 0)
+ {
+@@ -2420,16 +2420,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ characters = 0;
+ for (;;)
+ {
+- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
++ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+ # if HAVE_WCRTOMB
+- count = wcrtomb (buf, *arg_end, &state);
++ count = wcrtomb (cbuf, *arg_end, &state);
+ # else
+- count = wctomb (buf, *arg_end);
++ count = wctomb (cbuf, *arg_end);
+ # endif
+ if (count < 0)
+ {
+@@ -2470,20 +2470,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ # endif
+ for (remaining = characters; remaining > 0; )
+ {
+- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
++ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+ # if HAVE_WCRTOMB
+- count = wcrtomb (buf, *arg, &state);
++ count = wcrtomb (cbuf, *arg, &state);
+ # else
+- count = wctomb (buf, *arg);
++ count = wctomb (cbuf, *arg);
+ # endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+- memcpy (tmpptr, buf, count);
++ memcpy (tmpptr, cbuf, count);
+ tmpptr += count;
+ arg++;
+ remaining -= count;
+@@ -2552,20 +2552,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ ENSURE_ALLOCATION (xsum (length, characters));
+ for (remaining = characters; remaining > 0; )
+ {
+- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
++ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+ # if HAVE_WCRTOMB
+- count = wcrtomb (buf, *arg, &state);
++ count = wcrtomb (cbuf, *arg, &state);
+ # else
+- count = wctomb (buf, *arg);
++ count = wctomb (cbuf, *arg);
+ # endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+- memcpy (result + length, buf, count);
++ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ remaining -= count;
+@@ -2581,21 +2581,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ # endif
+ while (arg < arg_end)
+ {
+- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
++ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+ # if HAVE_WCRTOMB
+- count = wcrtomb (buf, *arg, &state);
++ count = wcrtomb (cbuf, *arg, &state);
+ # else
+- count = wctomb (buf, *arg);
++ count = wctomb (cbuf, *arg);
+ # endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ ENSURE_ALLOCATION (xsum (length, count));
+- memcpy (result + length, buf, count);
++ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ }