From owner-svn-src-head@freebsd.org Sun Dec 24 16:39:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9F3AE9BCEA; Sun, 24 Dec 2017 16:39:58 +0000 (UTC) (envelope-from kan@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 mx1.freebsd.org (Postfix) with ESMTPS id 83F601178; Sun, 24 Dec 2017 16:39:58 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBOGdvnn071010; Sun, 24 Dec 2017 16:39:57 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBOGdvX2071009; Sun, 24 Dec 2017 16:39:57 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201712241639.vBOGdvX2071009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Sun, 24 Dec 2017 16:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327163 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: kan X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 327163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Dec 2017 16:39:58 -0000 Author: kan Date: Sun Dec 24 16:39:57 2017 New Revision: 327163 URL: https://svnweb.freebsd.org/changeset/base/327163 Log: Remove write-only opt and useless optlen variables. This squashes the warning gebnerated by GCC 6.x. Since variables that are now removed had come documentation value, put relevant bits in comment, so they can be resurrected from there when actually needed. Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sun Dec 24 16:36:50 2017 (r327162) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sun Dec 24 16:39:57 2017 (r327163) @@ -707,10 +707,8 @@ print_loadopt_str(uint8_t *data, size_t datalen) uint8_t *ep = data + datalen; uint8_t *walker = data; efidp dp, edp; - void *opt; char buf[1024]; int len; - int optlen; int rv; int indent; @@ -734,10 +732,11 @@ print_loadopt_str(uint8_t *data, size_t datalen) if (walker > ep) return; edp = (efidp)walker; - // Everything left is the binary option args - opt = walker; - optlen = ep - walker; - + /* + * Everything left is the binary option args + * opt = walker; + * optlen = ep - walker; + */ indent = 1; while (dp < edp) { efidp_format_device_path(buf, sizeof(buf), dp, @@ -753,8 +752,6 @@ print_loadopt_str(uint8_t *data, size_t datalen) } dp = (efidp)((char *)dp + efidp_size(dp)); } - if (optlen == 0) - return; } static char *