git: 572edd3dae9f - main - vmm: Re-quiet set but unused warnings.
Date: Fri, 08 Apr 2022 00:04:00 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=572edd3dae9fc3e67dfb1cb9ba023e8d3fe2a9bb commit 572edd3dae9fc3e67dfb1cb9ba023e8d3fe2a9bb Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-08 00:01:29 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-08 00:01:29 +0000 vmm: Re-quiet set but unused warnings. __diagused is no longer used for KTR, so instead use #ifdef KTR or expand KTR-only variables into their values in traces. --- sys/amd64/vmm/io/vrtc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/io/vrtc.c b/sys/amd64/vmm/io/vrtc.c index dd32b279cf03..10bab96700e4 100644 --- a/sys/amd64/vmm/io/vrtc.c +++ b/sys/amd64/vmm/io/vrtc.c @@ -285,12 +285,13 @@ rtc_to_secs(struct vrtc *vrtc) struct clocktime ct; struct timespec ts; struct rtcdev *rtc; - struct vm *vm __diagused; +#ifdef KTR + struct vm *vm = vtrc->vm; +#endif int century, error, hour, pm, year; KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__)); - vm = vrtc->vm; rtc = &vrtc->rtcdev; bzero(&ct, sizeof(struct clocktime)); @@ -401,7 +402,6 @@ static int vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase) { struct rtcdev *rtc; - sbintime_t oldbase __diagused; time_t oldtime; uint8_t alarm_sec, alarm_min, alarm_hour; @@ -416,9 +416,8 @@ vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase) VM_CTR2(vrtc->vm, "Updating RTC secs from %#lx to %#lx", oldtime, newtime); - oldbase = vrtc->base_uptime; VM_CTR2(vrtc->vm, "Updating RTC base uptime from %#lx to %#lx", - oldbase, newbase); + vrtc->base_uptime, newbase); vrtc->base_uptime = newbase; if (newtime == oldtime)