Fix explicit casts of signed integer types to unsigned long long
* defs.h (widen_to_ull): New macro.
* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place
of explicit casts to unsigned long long.
* io.c (print_lld_from_low_high_val): Likewise.
* lseek.c (SYS_FUNC(llseek)): Likewise.
* printsiginfo.c (print_si_info): Likewise.
* printstat.h (DO_PRINTSTAT): Likewise.
* sysinfo.c (SYS_FUNC(sysinfo)): Likewise.
* times.c (SYS_FUNC(times)): Likewise.
* fetch_struct_statfs.c (ASSIGN_NUMBER): Remove.
(fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER
with widen_to_ull.
diff --git a/times.c b/times.c
index d3f6daf..04df462 100644
--- a/times.c
+++ b/times.c
@@ -46,11 +46,11 @@
if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
tprintf("{tms_utime=%llu, tms_stime=%llu, ",
- (unsigned long long) tbuf.tms_utime,
- (unsigned long long) tbuf.tms_stime);
+ widen_to_ull(tbuf.tms_utime),
+ widen_to_ull(tbuf.tms_stime));
tprintf("tms_cutime=%llu, tms_cstime=%llu}",
- (unsigned long long) tbuf.tms_cutime,
- (unsigned long long) tbuf.tms_cstime);
+ widen_to_ull(tbuf.tms_cutime),
+ widen_to_ull(tbuf.tms_cstime));
}
return syserror(tcp) ? RVAL_DECIMAL :