From 553375d8aa327a7e50ea7897d225962ad5c27364 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 4 Jul 2024 16:08:36 +0200 Subject: [PATCH] CUpnpBrowserGui: Fix format specifiers for time_t for platform compatibility - Use PRId64 in snprintf to format time_t variables correctly. - This avoids [-Wformat=] warnings and ensures platform-independent code. --- src/gui/upnpbrowser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 5830afbde..bb18c1dbb 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -1366,7 +1366,7 @@ void CUpnpBrowserGui::updateTimes(const bool force) //printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed); char play_time[24]; - snprintf(play_time, sizeof(play_time), "%ld:%02ld", m_time_played / 60, m_time_played % 60); + snprintf(play_time, sizeof(play_time), "%" PRId64 ":%02" PRId64, (int64_t)(m_time_played / 60), (int64_t)(m_time_played % 60)); if (updatePlayed) {