Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
* lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
'unsigned int' before comparison with an unsigned value.
+2018-09-30 Bruno Haible <bruno@clisp.org>
+
+ vasnprintf: Avoid warnings from GCC's -Wsign-compare.
+ Reported by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00105.html>.
+ * lib/vasnprintf.c (VASNPRINTF): Cast 'count' from 'int' to
+ 'unsigned int' before comparison with an unsigned value.
+
2018-09-30 Bruno Haible <bruno@clisp.org>
grantpt: Remove unnecessary dependency.
errno = EILSEQ;
return NULL;
}
- if (precision < count)
+ if (precision < (unsigned int) count)
break;
arg_end++;
characters += count;
{
/* Verify that snprintf() has NUL-terminated its
result. */
- if (count < maxlen
+ if ((unsigned int) count < maxlen
&& ((TCHAR_T *) (result + length)) [count] != '\0')
abort ();
/* Portability hack. */