From owner-svn-src-head@freebsd.org Mon Nov 2 03:14:38 2015 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 5E995A249A8; Mon, 2 Nov 2015 03:14:38 +0000 (UTC) (envelope-from ngie@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 2B9E81FEF; Mon, 2 Nov 2015 03:14:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tA23EbgY036923; Mon, 2 Nov 2015 03:14:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tA23Eb40036922; Mon, 2 Nov 2015 03:14:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511020314.tA23Eb40036922@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 2 Nov 2015 03:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290257 - head/sys/kern X-SVN-Group: head 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.20 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: Mon, 02 Nov 2015 03:14:38 -0000 Author: ngie Date: Mon Nov 2 03:14:37 2015 New Revision: 290257 URL: https://svnweb.freebsd.org/changeset/base/290257 Log: Define `fhard` in pps_event(..) only when PPS_SYNC is defined to mute an -Wunused-but-set-variable warning Reported by: FreeBSD_HEAD_amd64_gcc4.9 jenkins job Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Mon Nov 2 01:47:26 2015 (r290256) +++ head/sys/kern/kern_tc.c Mon Nov 2 03:14:37 2015 (r290257) @@ -1702,13 +1702,16 @@ pps_event(struct pps_state *pps, int eve struct bintime bt; struct timespec ts, *tsp, *osp; u_int tcount, *pcount; - int foff, fhard; + int foff; pps_seq_t *pseq; #ifdef FFCLOCK struct timespec *tsp_ffc; pps_seq_t *pseq_ffc; ffcounter *ffcount; #endif +#ifdef PPS_SYNC + int fhard; +#endif KASSERT(pps != NULL, ("NULL pps pointer in pps_event")); /* Nothing to do if not currently set to capture this event type. */ @@ -1724,7 +1727,9 @@ pps_event(struct pps_state *pps, int eve tsp = &pps->ppsinfo.assert_timestamp; osp = &pps->ppsparam.assert_offset; foff = pps->ppsparam.mode & PPS_OFFSETASSERT; +#ifdef PPS_SYNC fhard = pps->kcmode & PPS_CAPTUREASSERT; +#endif pcount = &pps->ppscount[0]; pseq = &pps->ppsinfo.assert_sequence; #ifdef FFCLOCK @@ -1736,7 +1741,9 @@ pps_event(struct pps_state *pps, int eve tsp = &pps->ppsinfo.clear_timestamp; osp = &pps->ppsparam.clear_offset; foff = pps->ppsparam.mode & PPS_OFFSETCLEAR; +#ifdef PPS_SYNC fhard = pps->kcmode & PPS_CAPTURECLEAR; +#endif pcount = &pps->ppscount[1]; pseq = &pps->ppsinfo.clear_sequence; #ifdef FFCLOCK