1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3275>
This commit is contained in:
Pascal Nowack 2023-09-13 12:21:05 +02:00 committed by Marge Bot
parent bac157b037
commit 6a2b9d6d43

View file

@ -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);