top(1): build with WARN=2
This commit is contained in:
parent
2877df8d84
commit
4901ca088d
@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h
|
||||
CFLAGS+= -I ${.OBJDIR}
|
||||
MAN= top.1
|
||||
|
||||
WARNS?= 1
|
||||
WARNS?= 2
|
||||
|
||||
LIBADD= ncursesw m kvm jail
|
||||
|
||||
|
@ -872,7 +872,7 @@ get_process_info(struct system_info *si, struct process_select *sel,
|
||||
total_oublock += p_oublock;
|
||||
total_majflt += p_majflt;
|
||||
total_procs++;
|
||||
process_states[pp->ki_stat]++;
|
||||
process_states[(unsigned char)pp->ki_stat]++;
|
||||
|
||||
if (pp->ki_stat == SZOMB)
|
||||
/* skip zombies */
|
||||
@ -1316,7 +1316,7 @@ static int sorted_state[] = {
|
||||
} while (0)
|
||||
|
||||
#define ORDERKEY_STATE(a, b) do { \
|
||||
int diff = sorted_state[(b)->ki_stat] - sorted_state[(a)->ki_stat]; \
|
||||
int diff = sorted_state[(unsigned char)(b)->ki_stat] - sorted_state[(unsigned char)(a)->ki_stat]; \
|
||||
if (diff != 0) \
|
||||
return (diff > 0 ? 1 : -1); \
|
||||
} while (0)
|
||||
|
@ -59,8 +59,6 @@ char *terminal_end;
|
||||
static struct termios old_settings;
|
||||
static struct termios new_settings;
|
||||
static char is_a_terminal = No;
|
||||
static int old_lword;
|
||||
static int new_lword;
|
||||
|
||||
#define STDIN 0
|
||||
#define STDOUT 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user