mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
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 is contained in:
@@ -1127,11 +1127,11 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
||||
{
|
||||
Progress = 100 * done / total;
|
||||
|
||||
snprintf(Duration, sizeof(Duration), "%ld:%02ld/%ld:%02ld\n%ld:%02ld\n%ld:%02ld\n%ld:%02ld",
|
||||
done / 60, done % 60, total / 60, total % 60,
|
||||
done / 60, done % 60,
|
||||
todo / 60, todo % 60,
|
||||
total / 60, total % 60);
|
||||
snprintf(Duration, sizeof(Duration), "%" PRId64 ":%02" PRId64 "/%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64 "\n%" PRId64 ":%02" PRId64,
|
||||
(int64_t)(done / 60), (int64_t)(done % 60), (int64_t)(total / 60), (int64_t)(total % 60),
|
||||
(int64_t)(done / 60), (int64_t)(done % 60),
|
||||
(int64_t)(todo / 60), (int64_t)(todo % 60),
|
||||
(int64_t)(total / 60), (int64_t)(total % 60));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1309,6 +1309,7 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
bool CLCD4l::WriteFile(const char *file, std::string content, bool convert)
|
||||
|
Reference in New Issue
Block a user