From owner-dev-commits-src-all@freebsd.org Thu Apr 1 07:59:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84E835C261D; Thu, 1 Apr 2021 07:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9wZ53MM7z4sC0; Thu, 1 Apr 2021 07:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 662901289; Thu, 1 Apr 2021 07:59:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1317xPJU029950; Thu, 1 Apr 2021 07:59:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1317xPWJ029949; Thu, 1 Apr 2021 07:59:25 GMT (envelope-from git) Date: Thu, 1 Apr 2021 07:59:25 GMT Message-Id: <202104010759.1317xPWJ029949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 3802433d25c9 - stable/12 - Fix warning about signed comparison and drop WARNS for ktrdump(8). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3802433d25c9274fe71f024bbf260aa1450a3e1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 07:59:25 -0000 The branch stable/12 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=3802433d25c9274fe71f024bbf260aa1450a3e1a commit 3802433d25c9274fe71f024bbf260aa1450a3e1a Author: Dmitry Chagin AuthorDate: 2021-03-24 07:51:25 +0000 Commit: Dmitry Chagin CommitDate: 2021-04-01 07:52:34 +0000 Fix warning about signed comparison and drop WARNS for ktrdump(8). Reviewed By: jhb, imp Differential Revision: https://reviews.freebsd.org/D29381 (cherry picked from commit 9e5aeba51b431256adfd18b087ee61b09bfd6a79) --- usr.bin/ktrdump/Makefile | 2 -- usr.bin/ktrdump/ktrdump.c | 14 +++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/usr.bin/ktrdump/Makefile b/usr.bin/ktrdump/Makefile index 63cd2cf2cea9..796569977f0f 100644 --- a/usr.bin/ktrdump/Makefile +++ b/usr.bin/ktrdump/Makefile @@ -4,6 +4,4 @@ PROG= ktrdump LIBADD= kvm MAN= ktrdump.8 -WARNS?= 2 - .include diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c index 750f138f5485..bbe8fb19aae9 100644 --- a/usr.bin/ktrdump/ktrdump.c +++ b/usr.bin/ktrdump/ktrdump.c @@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$"); static void usage(void); static struct nlist nl[] = { - { "_ktr_version" }, - { "_ktr_entries" }, - { "_ktr_idx" }, - { "_ktr_buf" }, - { NULL } + { .n_name = "_ktr_version" }, + { .n_name = "_ktr_entries" }, + { .n_name = "_ktr_idx" }, + { .n_name = "_ktr_buf" }, + { .n_name = NULL } }; static int cflag; @@ -262,7 +262,7 @@ main(int ac, char **av) fprintf(out, "\n"); } - tlast = -1; + tlast = UINTPTR_MAX; /* * Now tear through the trace buffer. * @@ -327,7 +327,7 @@ next: if ((c = *p++) == '\0') if (tflag) { tnow = (uintmax_t)buf[i].ktr_timestamp; if (rflag) { - if (tlast == -1) + if (tlast == UINTPTR_MAX) tlast = tnow; fprintf(out, "%16ju ", !iflag ? tlast - tnow : tnow - tlast);