]> Savannah Git Hosting - gnulib.git/commit
posixtm: pacify latest GCC
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Jul 2021 22:55:18 +0000 (17:55 -0500)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Jul 2021 23:03:16 +0000 (18:03 -0500)
commit07be6b74552efb9393bd1203497dfe41a6368882
tree05e4dd6cd489e4665d324d1f1cd79b45f0e28abd
parent12b5b00f93c6433c3df8176fc9674d7600f8b268
posixtm: pacify latest GCC

Also, modernize while I’m at it.
* lib/posixtm.c: Include c-ctype.h, idx.h, intprops.h, verify.h
instead of stdlib.h.
(ISDIGIT): Remove.  All uses replaced by c_isdigit.
(year, posix_time_parse): Prefer idx_t to size_t.  Use assume
instead of abort.
(posixtime): Do not parse twice; once is enough.  That way, we
needn’t worry about a bogus warning about strcpy overrunning a
buffer from GCC 11.1.1 20210531 (Red Hat 11.1.1-3) x86-64
when coreutils is configured with --enable-gcc-warnings.
* modules/posixtm (Depends-on): Add c-ctype, intprops, verify.
Remove stpcpy.
ChangeLog
lib/posixtm.c
modules/posixtm