Bug 209685 - [PATCH] /usr/bin/top: silence compiler warnings
Summary: [PATCH] /usr/bin/top: silence compiler warnings
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Enji Cooper
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-05-21 21:15 UTC by Randy Westlund
Modified: 2017-01-03 05:29 UTC (History)
1 user (show)

See Also:
ngie: mfc-stable9+
ngie: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 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.