From owner-svn-src-all@freebsd.org Sat Feb 10 17:17:16 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 5CB3AF0C9EC; Sat, 10 Feb 2018 17:17:16 +0000 (UTC) (envelope-from jhibbits@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 0C5F987F9A; Sat, 10 Feb 2018 17:17:16 +0000 (UTC) (envelope-from jhibbits@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 02BCD16F8C; Sat, 10 Feb 2018 17:17:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1AHHF9C014201; Sat, 10 Feb 2018 17:17:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1AHHFUE014200; Sat, 10 Feb 2018 17:17:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201802101717.w1AHHFUE014200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 10 Feb 2018 17:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329106 - head/usr.bin/tftp X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/usr.bin/tftp X-SVN-Commit-Revision: 329106 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.25 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: Sat, 10 Feb 2018 17:17:16 -0000 Author: jhibbits Date: Sat Feb 10 17:17:15 2018 New Revision: 329106 URL: https://svnweb.freebsd.org/changeset/base/329106 Log: Fix uninitialized warning, and work around a bug in gcc over clobbering Summary: r329077 caused gcc to emit uninitialized use warnings. Attempting to fix those warnings yielded the following warnings: usr.bin/tftp/main.c: In function 'main': usr.bin/tftp/main.c:181: warning: variable 'el' might be clobbered by 'longjmp' or 'vfork' usr.bin/tftp/main.c:182: warning: variable 'hist' might be clobbered by 'longjmp' or 'vfork' This is a known bug in gcc, found at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24239 Work around that by simply marking hist and el as static. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14302 Modified: head/usr.bin/tftp/main.c Modified: head/usr.bin/tftp/main.c ============================================================================== --- head/usr.bin/tftp/main.c Sat Feb 10 17:09:51 2018 (r329105) +++ head/usr.bin/tftp/main.c Sat Feb 10 17:17:15 2018 (r329106) @@ -178,8 +178,8 @@ int main(int argc, char *argv[]) { HistEvent he; - EditLine *el; - History *hist; + static EditLine *el; + static History *hist; bool interactive; acting_as_client = 1;