Fix warning in sync.c when debug logs are not enabled https://bugs.freedesktop.org/show_bug.cgi?id=56439