The /contrib/top code is no longer maintained upstream (last pulled 16 years ago). The K&R-style followed by the code spews -Wimplicit-int and -Wreturn-type warnings, among others. This diff silences 131 warnings with as little modification as possible. Once this is committed, I intend to continue cleaning up top, including ANSIfication, style(9), and maybe moving it out of contrib. https://reviews.freebsd.org/D6468
This was committed in r300395. https://svnweb.freebsd.org/changeset/base/300395
(In reply to Randy Westlund from comment #1) It still needs to be MFCed though. Thanks for the reminder about the PR ;).
Oh go figure. I already handled ^/stable/9 too... ------------------------------------------------------------------------ r301836 | ngie | 2016-06-11 22:57:42 -0700 (Sat, 11 Jun 2016) | 14 lines MFC r300395: Silence top(1) compiler warnings The contrib/top code is no longer maintained upstream (last pulled 16 years ago). The K&R-style followed by the code spews -Wimplicit-int and -Wreturn-type warnings, amongst others. This silences 131 warnings with as little modification as possible by adding necessary return types, definitions, headers, and header guards, and missing header includes. The 5 warnings that remain are due to undeclared ncurses references. I didn't include curses.h and term.h because there are several local functions and macros that conflict with those definitions. ------------------------------------------------------------------------ r301837 | ngie | 2016-06-12 01:32:39 -0700 (Sun, 12 Jun 2016) | 16 lines MFstable/10 r301836: MFC r300395: Silence top(1) compiler warnings The contrib/top code is no longer maintained upstream (last pulled 16 years ago). The K&R-style followed by the code spews -Wimplicit-int and -Wreturn-type warnings, amongst others. This silences 131 warnings with as little modification as possible by adding necessary return types, definitions, headers, and header guards, and missing header includes. The 5 warnings that remain are due to undeclared ncurses references. I didn't include curses.h and term.h because there are several local functions and macros that conflict with those definitions.