git: 3a180da6891c - stable/13 - vmm: fix "set but not used" warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Jan 2023 19:28:37 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a180da6891c285d9f1652ca6580def0fc99bd2e commit 3a180da6891c285d9f1652ca6580def0fc99bd2e Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2022-03-01 00:09:32 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-01-26 19:26:19 +0000 vmm: fix "set but not used" warnings (cherry picked from commit 2062ce996ddd39ba7a36c2caf8c898686d9cb2fe) --- sys/amd64/vmm/io/vlapic.c | 2 +- sys/amd64/vmm/io/vrtc.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index 5deca142c5d1..0e1fb1bbf006 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -202,7 +202,7 @@ static uint32_t vlapic_get_ccr(struct vlapic *vlapic) { struct bintime bt_now, bt_rem; - struct LAPIC *lapic; + struct LAPIC *lapic __diagused; uint32_t ccr; ccr = 0; diff --git a/sys/amd64/vmm/io/vrtc.c b/sys/amd64/vmm/io/vrtc.c index 5d6968e3583e..dd32b279cf03 100644 --- a/sys/amd64/vmm/io/vrtc.c +++ b/sys/amd64/vmm/io/vrtc.c @@ -285,7 +285,7 @@ rtc_to_secs(struct vrtc *vrtc) struct clocktime ct; struct timespec ts; struct rtcdev *rtc; - struct vm *vm; + struct vm *vm __diagused; int century, error, hour, pm, year; KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__)); @@ -401,7 +401,7 @@ static int vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase) { struct rtcdev *rtc; - sbintime_t oldbase; + sbintime_t oldbase __diagused; time_t oldtime; uint8_t alarm_sec, alarm_min, alarm_hour; @@ -545,7 +545,7 @@ vrtc_callout_handler(void *arg) struct vrtc *vrtc = arg; sbintime_t freqsbt, basetime; time_t rtctime; - int error; + int error __diagused; VM_CTR0(vrtc->vm, "vrtc callout fired"); @@ -581,7 +581,7 @@ done: static __inline void vrtc_callout_check(struct vrtc *vrtc, sbintime_t freq) { - int active; + int active __diagused; active = callout_active(&vrtc->callout) ? 1 : 0; KASSERT((freq == 0 && !active) || (freq != 0 && active), @@ -633,7 +633,7 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_t newval) struct rtcdev *rtc; sbintime_t oldfreq, newfreq, basetime; time_t curtime, rtctime; - int error; + int error __diagused; uint8_t oldval, changed; KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__));