mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
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.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2f229ef555
Author: Thilo Graf <dbt@novatux.de>
Date: 2024-09-02 (Mon, 02 Sep 2024)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1367,7 +1367,7 @@ void CUpnpBrowserGui::updateTimes(const bool force)
|
|||||||
|
|
||||||
//printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
|
//printf("updateTimes: force %d updatePlayed %d\n", force, updatePlayed);
|
||||||
char play_time[24];
|
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)
|
if (updatePlayed)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user