From 6a2b9d6d43daa45b4bd24589659f489fe5edb7fe Mon Sep 17 00:00:00 2001 From: Pascal Nowack Date: Wed, 13 Sep 2023 12:21:05 +0200 Subject: [PATCH] clutter/frame-clock: Fix unused variable warning When CLUTTER_ENABLE_DEBUG is not defined, then CLUTTER_NOTE is defined as an empty block of code. As a result of that, jitter_us is in that situation unused, and a compiler warning about this unused variable appears. Part-of: --- clutter/clutter/clutter-frame-clock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 8d5742836..30cc6fb12 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -739,6 +739,7 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock, else frame_clock->last_dispatch_lateness_us = lateness_us; +#ifdef CLUTTER_ENABLE_DEBUG if (G_UNLIKELY (CLUTTER_HAS_DEBUG (FRAME_TIMINGS))) { int64_t dispatch_interval_us, jitter_us; @@ -752,6 +753,7 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock, jitter_us, jitter_us * 100 / frame_clock->refresh_interval_us); } +#endif frame_clock->last_dispatch_time_us = time_us; g_source_set_ready_time (frame_clock->source, -1);