diff options
author | Ngie Cooper <ngie@FreeBSD.org> | 2015-11-02 03:14:37 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-12 07:04:10 +0200 |
commit | 4cd742ed1d0252cfa7c0b034cf079b46ba317046 (patch) | |
tree | b7b26119ba6768bdfa10d9ef755103e20c570bde | |
parent | timecounter: Merge FreeBSD change r288216 (diff) | |
download | rtems-4cd742ed1d0252cfa7c0b034cf079b46ba317046.tar.bz2 |
timecounter: Merge FreeBSD change r290257
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
Update #3175.
-rw-r--r-- | cpukit/score/src/kern_tc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c index 1e8189acea..20189cb1f5 100644 --- a/cpukit/score/src/kern_tc.c +++ b/cpukit/score/src/kern_tc.c @@ -1901,13 +1901,16 @@ pps_event(struct pps_state *pps, int event) struct bintime bt; struct timespec ts, *tsp, *osp; uint32_t 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. */ @@ -1923,7 +1926,9 @@ pps_event(struct pps_state *pps, int event) 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 @@ -1935,7 +1940,9 @@ pps_event(struct pps_state *pps, int event) 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 |