From owner-dev-commits-src-all@freebsd.org Thu Jul 8 14:01:00 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 EA895669F28; Thu, 8 Jul 2021 14:01:00 +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 4GLHy46GZgz3Jf8; Thu, 8 Jul 2021 14:01:00 +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 BE31E221B8; Thu, 8 Jul 2021 14:01:00 +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 168E10Ss088337; Thu, 8 Jul 2021 14:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 168E10in088336; Thu, 8 Jul 2021 14:01:00 GMT (envelope-from git) Date: Thu, 8 Jul 2021 14:01:00 GMT Message-Id: <202107081401.168E10in088336@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: b29817874d19 - main - setkey: fix several warnings popping up when compiling without WARNS=1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b29817874d19ce3e4e4c78e3cb74ebefe71f90cc 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, 08 Jul 2021 14:01:01 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b29817874d19ce3e4e4c78e3cb74ebefe71f90cc commit b29817874d19ce3e4e4c78e3cb74ebefe71f90cc Author: Mateusz Guzik AuthorDate: 2021-07-08 11:30:45 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-08 14:00:55 +0000 setkey: fix several warnings popping up when compiling without WARNS=1 --- sbin/setkey/setkey.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sbin/setkey/setkey.c b/sbin/setkey/setkey.c index d011fd44a40a..9e896996a259 100644 --- a/sbin/setkey/setkey.c +++ b/sbin/setkey/setkey.c @@ -73,17 +73,17 @@ static int32_t gmt2local(time_t); #define MODE_CMDFLUSH 3 #define MODE_PROMISC 4 -int so; - -int f_forever = 0; -int f_all = 0; -int f_verbose = 0; -int f_mode = 0; -int f_cmddump = 0; -int f_policy = 0; -int f_hexdump = 0; -int f_tflag = 0; -int f_scope = 0; +static int so; + +static int f_forever = 0; +static int f_all = 0; +static int f_verbose = 0; +static int f_mode = 0; +static int f_cmddump = 0; +static int f_policy = 0; +static int f_hexdump = 0; +static int f_tflag = 0; +static int f_scope = 0; static time_t thiszone; extern int lineno; @@ -322,10 +322,10 @@ again: printf("\n"); } if (f_hexdump) { - int i; + size_t i; for (i = 0; i < len; i++) { if (i % 16 == 0) - printf("%08x: ", i); + printf("%08x: ", (u_int)i); printf("%02x ", buf[i] & 0xff); if (i % 16 == 15) printf("\n");