Fix warning about signed comparison and drop WARNS for ktrdump(8).
Reviewed By: jhb, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29381
This commit is contained in:
parent
dbbf3e3f37
commit
9e5aeba51b
@ -4,6 +4,4 @@ PROG= ktrdump
|
|||||||
LIBADD= kvm
|
LIBADD= kvm
|
||||||
MAN= ktrdump.8
|
MAN= ktrdump.8
|
||||||
|
|
||||||
WARNS?= 2
|
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$");
|
|||||||
static void usage(void);
|
static void usage(void);
|
||||||
|
|
||||||
static struct nlist nl[] = {
|
static struct nlist nl[] = {
|
||||||
{ "_ktr_version" },
|
{ .n_name = "_ktr_version" },
|
||||||
{ "_ktr_entries" },
|
{ .n_name = "_ktr_entries" },
|
||||||
{ "_ktr_idx" },
|
{ .n_name = "_ktr_idx" },
|
||||||
{ "_ktr_buf" },
|
{ .n_name = "_ktr_buf" },
|
||||||
{ NULL }
|
{ .n_name = NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int cflag;
|
static int cflag;
|
||||||
@ -262,7 +262,7 @@ main(int ac, char **av)
|
|||||||
fprintf(out, "\n");
|
fprintf(out, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
tlast = -1;
|
tlast = UINTPTR_MAX;
|
||||||
/*
|
/*
|
||||||
* Now tear through the trace buffer.
|
* Now tear through the trace buffer.
|
||||||
*
|
*
|
||||||
@ -327,7 +327,7 @@ next: if ((c = *p++) == '\0')
|
|||||||
if (tflag) {
|
if (tflag) {
|
||||||
tnow = (uintmax_t)buf[i].ktr_timestamp;
|
tnow = (uintmax_t)buf[i].ktr_timestamp;
|
||||||
if (rflag) {
|
if (rflag) {
|
||||||
if (tlast == -1)
|
if (tlast == UINTPTR_MAX)
|
||||||
tlast = tnow;
|
tlast = tnow;
|
||||||
fprintf(out, "%16ju ", !iflag ? tlast - tnow :
|
fprintf(out, "%16ju ", !iflag ? tlast - tnow :
|
||||||
tnow - tlast);
|
tnow - tlast);
|
||||||
|
Loading…
Reference in New Issue
Block a user