Module Name: src
Committed By: christos
Date: Fri Jan 31 21:20:21 UTC 2025
Modified Files:
src/lib/libc/time: localtime.c
Log Message:
fix compat-32 lint on sparc64 (int_least32_t->int_fast32_t)
To generate a diff of this commit:
cvs rdiff -u -r1.145 -r1.146 src/lib/libc/time/localtime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.145 src/lib/libc/time/localtime.c:1.146
--- src/lib/libc/time/localtime.c:1.145 Thu Jan 23 17:44:22 2025
+++ src/lib/libc/time/localtime.c Fri Jan 31 16:20:21 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: localtime.c,v 1.145 2025/01/23 22:44:22 christos Exp $ */
+/* $NetBSD: localtime.c,v 1.146 2025/01/31 21:20:21 christos Exp $ */
/* Convert timestamp from time_t to struct tm. */
@@ -12,7 +12,7 @@
#if 0
static char elsieid[] = "@(#)localtime.c 8.17";
#else
-__RCSID("$NetBSD: localtime.c,v 1.145 2025/01/23 22:44:22 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.146 2025/01/31 21:20:21 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -363,7 +363,7 @@ static void
init_ttinfo(struct ttinfo *s, int_fast32_t utoff, bool isdst,
desigidx_type desigidx)
{
- s->tt_utoff = utoff;
+ s->tt_utoff = (int_least_32_t)utoff;
s->tt_isdst = isdst;
s->tt_desigidx = desigidx;
s->tt_ttisstd = false;
@@ -766,7 +766,7 @@ tzloadbody(char const *name, struct stat
unsigned char isdst, desigidx;
ttisp = &sp->ttis[i];
- ttisp->tt_utoff = detzcode(p);
+ ttisp->tt_utoff = (int_least32_t)detzcode(p);
p += 4;
isdst = *p++;
if (! (isdst < 2))