lcd4l.cpp: Fix format warnings

- Corrected the format specifiers in snprintf calls to match the data
 types of the arguments.
- Used PRId64 for int64_t types to ensure compatibility across different
 platforms.
- Added explicit type casting to int64_t for time_t variables
 to resolve mismatched format warnings.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 6370dc8185
Author: Thilo Graf <dbt@novatux.de>
Date: 2024-09-02 (Mon, 02 Sep 2024)

Origin message was:
------------------
lcd4l.cpp: Fix format warnings

- Corrected the format specifiers in snprintf calls to match the data
 types of the arguments.
- Used PRId64 for int64_t types to ensure compatibility across different
 platforms.
- Added explicit type casting to int64_t for time_t variables
 to resolve mismatched format warnings.


------------------
This commit was generated by Migit
This commit is contained in:
2024-09-02 21:06:01 +02:00
committed by vanhofen
parent 19645e4f14
commit 29f9743e15

View File

@@ -576,7 +576,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
std::string DolbyDigital; std::string DolbyDigital;
if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) && if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) &&
(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3)) (g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3))
DolbyDigital = "yes"; DolbyDigital = "yes";
else else
DolbyDigital = g_RemoteControl->has_ac3 ? "available" : "no"; DolbyDigital = g_RemoteControl->has_ac3 ? "available" : "no";
@@ -763,9 +763,9 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
Service = g_RemoteControl->getCurrentChannelName(); Service = g_RemoteControl->getCurrentChannelName();
/* /*
"moviebrowser_moviecut" is special. "moviebrowser_moviecut" is special.
It signals the active moviebrowser with the moviebrowser logo, It signals the active moviebrowser with the moviebrowser logo,
but handles the rest of the lcd as in tv/radio mode. but handles the rest of the lcd as in tv/radio mode.
*/ */
if (m_ActionKey == "moviebrowser_moviecut") if (m_ActionKey == "moviebrowser_moviecut")
@@ -1090,11 +1090,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
{ {
Progress = 100 * done / total; Progress = 100 * done / total;
snprintf(Duration, sizeof(Duration), "%ld:%02ld/%ld:%02ld\n%ld:%02ld\n%ld:%02ld\n%ld:%02ld", snprintf(Duration, sizeof(Duration), "%" PRId64 ":%02" PRId64 "/%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64,
done / 60, done % 60, total / 60, total % 60, (int64_t)(done / 60), (int64_t)(done % 60), (int64_t)(total / 60), (int64_t)(total % 60),
done / 60, done % 60, (int64_t)(done / 60), (int64_t)(done % 60),
todo / 60, todo % 60, (int64_t)(todo / 60), (int64_t)(todo % 60),
total / 60, total % 60); (int64_t)(total / 60), (int64_t)(total % 60));
} }
} }
@@ -1272,6 +1272,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
} }
} }
/* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */
bool CLCD4l::WriteFile(const char *file, std::string content, bool convert) bool CLCD4l::WriteFile(const char *file, std::string content, bool convert)