Mercurial > hg > octave-jordi > gnulib-hg
changeset 17938:b624b13ff5c1
vasnprintf: pacify clang 3.5.0
Problem reported by Werner Lemberg in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-03/msg00000.html
* lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to.
The casts aren't needed, since the characters in question are ASCII.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 03 Mar 2015 07:48:40 -0800 |
parents | 34065aa26b62 |
children | ab2606a2e87c |
files | ChangeLog lib/vasnprintf.c |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-03-03 Paul Eggert <eggert@cs.ucla.edu> + + vasnprintf: pacify clang 3.5.0 + Problem reported by Werner Lemberg in: + http://lists.gnu.org/archive/html/bug-gnulib/2015-03/msg00000.html + * lib/vasnprintf.c (VASNPRINTF): Omit casts that clang objects to. + The casts aren't needed, since the characters in question are ASCII. + 2015-02-24 Paul Eggert <eggert@cs.ucla.edu> glob, etc.: port to MSVC v18 on MS-Windows 8.1
--- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -1886,7 +1886,7 @@ else { do - result[length++] = (unsigned char) *cp++; + result[length++] = *cp++; while (--n > 0); } } @@ -4793,7 +4793,7 @@ { const FCHAR_T *mp = dp->width_start; do - *fbp++ = (unsigned char) *mp++; + *fbp++ = *mp++; while (--n > 0); } } @@ -4814,7 +4814,7 @@ { const FCHAR_T *mp = dp->precision_start; do - *fbp++ = (unsigned char) *mp++; + *fbp++ = *mp++; while (--n > 0); } } @@ -5382,7 +5382,7 @@ tmpsrc += count; tmpdst += count; for (n = count; n > 0; n--) - *--tmpdst = (unsigned char) *--tmpsrc; + *--tmpdst = *--tmpsrc; } } #endif