library: silence the clang warning for 'uptime' module

Reference(s):
proc/uptime.c:191:9: warning: variable 'uphours' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2022-05-18 00:00:00 -05:00 committed by Craig Small
parent e99c5abbf3
commit f080820931

View File

@ -151,7 +151,7 @@ PROCPS_EXPORT char *procps_uptime_sprint(void)
*/
PROCPS_EXPORT char *procps_uptime_sprint_short(void)
{
int updecades, upyears, upweeks, updays, uphours, upminutes = 0;
int updecades, upyears, upweeks, updays, uphours = 0, upminutes = 0;
int pos = 3;
int comma = 0;
double uptime_secs, idle_secs;