top(1): build with WARNS=3
This fixes everything but -Wincompatible-pointer-types-discards-qualifiers
This commit is contained in:
parent
a5ca08ed94
commit
1d6a4ba350
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333959
@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h
|
||||
CFLAGS+= -I ${.OBJDIR}
|
||||
MAN= top.1
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 3
|
||||
|
||||
LIBADD= ncursesw m kvm jail
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include <curses.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
@ -1042,14 +1043,16 @@ display_header(int t)
|
||||
}
|
||||
}
|
||||
|
||||
/*VARARGS2*/
|
||||
void
|
||||
new_message(int type, char *msgfmt, caddr_t a1, caddr_t a2, caddr_t a3)
|
||||
new_message(int type, char *msgfmt, ...)
|
||||
{
|
||||
int i;
|
||||
va_list args;
|
||||
size_t i;
|
||||
|
||||
va_start(args, msgfmt);
|
||||
|
||||
/* first, format the message */
|
||||
snprintf(next_msg, sizeof(next_msg), msgfmt, a1, a2, a3);
|
||||
snprintf(next_msg, sizeof(next_msg), msgfmt, args);
|
||||
|
||||
if (msglen > 0)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@ void i_procstates(int total, int *brkdn);
|
||||
void i_swap(int *stats);
|
||||
void i_timeofday(time_t *tod);
|
||||
void i_uptime(struct timeval *bt, time_t *tod);
|
||||
void new_message();
|
||||
void new_message(int type, char *msgfmt, ...);
|
||||
int readline(char *buffer, int size, int numeric);
|
||||
char *trim_header(char *text);
|
||||
void u_arc(int *stats);
|
||||
|
@ -91,4 +91,8 @@ int proc_owner(int pid);
|
||||
/* non-int routines typically used by the machine dependent module */
|
||||
char *printable(char *string);
|
||||
|
||||
caddr_t
|
||||
get_process_info(struct system_info *si, struct process_select *sel,
|
||||
int (*compare)(const void *, const void *));
|
||||
|
||||
#endif /* MACHINE_H */
|
||||
|
@ -221,7 +221,7 @@ char *argv[];
|
||||
int displays = 0; /* indicates unspecified */
|
||||
int sel_ret = 0;
|
||||
time_t curr_time;
|
||||
char *(*get_userid)() = username;
|
||||
char *(*get_userid)(int) = username;
|
||||
char *uname_field = "USERNAME";
|
||||
char *header_text;
|
||||
char *env_top;
|
||||
@ -625,7 +625,7 @@ char *argv[];
|
||||
|
||||
while ((displays == -1) || (displays-- > 0))
|
||||
{
|
||||
int (*compare)();
|
||||
int (*compare)(const void * const, const void * const);
|
||||
|
||||
|
||||
/* get the current stats */
|
||||
|
Loading…
Reference in New Issue
Block a user