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/sysinfo.c b/sysinfo.c
index e418f95..c3cb9ad 100644
--- a/sysinfo.c
+++ b/sysinfo.c
@@ -59,19 +59,19 @@
", freehigh=%llu"
", mem_unit=%u"
"}",
- (unsigned long long) si.uptime
- , (unsigned long long) si.loads[0]
- , (unsigned long long) si.loads[1]
- , (unsigned long long) si.loads[2]
- , (unsigned long long) si.totalram
- , (unsigned long long) si.freeram
- , (unsigned long long) si.sharedram
- , (unsigned long long) si.bufferram
- , (unsigned long long) si.totalswap
- , (unsigned long long) si.freeswap
+ widen_to_ull(si.uptime)
+ , widen_to_ull(si.loads[0])
+ , widen_to_ull(si.loads[1])
+ , widen_to_ull(si.loads[2])
+ , widen_to_ull(si.totalram)
+ , widen_to_ull(si.freeram)
+ , widen_to_ull(si.sharedram)
+ , widen_to_ull(si.bufferram)
+ , widen_to_ull(si.totalswap)
+ , widen_to_ull(si.freeswap)
, (unsigned) si.procs
- , (unsigned long long) si.totalhigh
- , (unsigned long long) si.freehigh
+ , widen_to_ull(si.totalhigh)
+ , widen_to_ull(si.freehigh)
, si.mem_unit
);
}