Bug 209685

Summary: [PATCH] /usr/bin/top: silence compiler warnings
Product: Base System Reporter: Randy Westlund <rwestlun>
Component: binAssignee: Enji Cooper <ngie>
Status: Closed FIXED    
Severity: Affects Only Me CC: ngie
Priority: --- Keywords: patch
Version: CURRENTFlags: ngie: mfc-stable10+
ngie: mfc-stable9+
Hardware: Any   
OS: Any   

Description Randy Westlund 2016-05-21 21:15:46 UTC
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
Comment 1 Randy Westlund 2016-05-22 07:52:31 UTC
This was committed in r300395.

https://svnweb.freebsd.org/changeset/base/300395
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2016-05-22 07:53:50 UTC
(In reply to Randy Westlund from comment #1)

It still needs to be MFCed though. Thanks for the reminder about the PR ;).
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2017-01-03 05:29:05 UTC
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.