From owner-svn-src-all@freebsd.org Mon May 21 00:32:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C9F0EF9D32; Mon, 21 May 2018 00:32:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 069657C600; Mon, 21 May 2018 00:32:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C44AB1DB05; Mon, 21 May 2018 00:32:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L0WnYZ077999; Mon, 21 May 2018 00:32:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4L0Wnbe077995; Mon, 21 May 2018 00:32:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805210032.w4L0Wnbe077995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 21 May 2018 00:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333949 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 333949 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 00:32:50 -0000 Author: eadler Date: Mon May 21 00:32:48 2018 New Revision: 333949 URL: https://svnweb.freebsd.org/changeset/base/333949 Log: top(1): build with WARN=2 Modified: head/usr.bin/top/Makefile head/usr.bin/top/machine.c head/usr.bin/top/screen.c Modified: head/usr.bin/top/Makefile ============================================================================== --- head/usr.bin/top/Makefile Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/Makefile Mon May 21 00:32:48 2018 (r333949) @@ -7,7 +7,7 @@ SRCS+= sigdesc.h top.local.h CFLAGS+= -I ${.OBJDIR} MAN= top.1 -WARNS?= 1 +WARNS?= 2 LIBADD= ncursesw m kvm jail Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/machine.c Mon May 21 00:32:48 2018 (r333949) @@ -872,7 +872,7 @@ get_process_info(struct system_info *si, struct proces total_oublock += p_oublock; total_majflt += p_majflt; total_procs++; - process_states[pp->ki_stat]++; + process_states[(unsigned char)pp->ki_stat]++; if (pp->ki_stat == SZOMB) /* skip zombies */ @@ -1316,7 +1316,7 @@ static int sorted_state[] = { } while (0) #define ORDERKEY_STATE(a, b) do { \ - int diff = sorted_state[(b)->ki_stat] - sorted_state[(a)->ki_stat]; \ + int diff = sorted_state[(unsigned char)(b)->ki_stat] - sorted_state[(unsigned char)(a)->ki_stat]; \ if (diff != 0) \ return (diff > 0 ? 1 : -1); \ } while (0) Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Mon May 21 00:20:32 2018 (r333948) +++ head/usr.bin/top/screen.c Mon May 21 00:32:48 2018 (r333949) @@ -59,8 +59,6 @@ char *terminal_end; static struct termios old_settings; static struct termios new_settings; static char is_a_terminal = No; -static int old_lword; -static int new_lword; #define STDIN 0 #define STDOUT 1