eadler 99ec1cb961 top(1): several small bugfixes and nits
- initialize all maybe uninitialized vars with bogus values. This shuts
up the compiler, and causes crashes if it changes later.
- mark noreturn as noreturn
- removed unused macro
- handle x_procstate as runtime rather than pre-processor
- avoid using void functions in condtionals

Tested with clang, gcc 7, gcc 9
2018-06-13 00:45:38 +00:00

21 lines
483 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
PROG= top
SRCS= commands.c display.c machine.c screen.c top.c \
username.c utils.c
MAN= top.1
.if ${COMPILER_TYPE} == "gcc"
.if ${COMPILER_VERSION} >= 50000
CFLAGS.gcc=-Wno-error=cast-qual -Wno-error=discarded-qualifiers -Wno-error=incompatible-pointer-types
.else #base gcc
NO_WERROR=
.endif
.endif
CFLAGS.clang=-Wno-error=incompatible-pointer-types-discards-qualifiers -Wno-error=cast-qual
LIBADD= ncursesw m kvm jail
.include <bsd.prog.mk>