From 88b0aa5dbec95306fdbf1297276aaff3077bb28b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 4 Jul 2024 16:08:36 +0200 Subject: [PATCH] moviecut.cpp: Fix format warnings in moviecut.cpp - Corrected the format specifiers in printf calls to match the data types of arguments. - Used PRIi64 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. --- src/driver/moviecut.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/driver/moviecut.cpp b/src/driver/moviecut.cpp index 30348b3e7..a43e7e848 100644 --- a/src/driver/moviecut.cpp +++ b/src/driver/moviecut.cpp @@ -531,7 +531,7 @@ bool CMovieCut::cutMovie(MI_MOVIE_INFO *minfo) lseek64(srcfd, offset, SEEK_SET); } tt1 = time(0); - printf("CMovieCut::%s: total written %" PRId64 " tooks %ld secs end time %s", __func__, spos, tt1 - tt, ctime(&tt1)); + printf("CMovieCut::%s: total written %" PRId64 " tooks %" PRIi64 " secs end time %s", __func__, spos, (int64_t)(tt1 - tt), ctime(&tt1)); save_info(minfo, dpart, spos, secsize); retval = true; @@ -690,14 +690,14 @@ bool CMovieCut::copyMovie(MI_MOVIE_INFO *minfo, bool onefile) dstfd = -1; save_info(minfo, dpart, spos, secsize); time_t tt1 = time(0); - printf("copy: ********* %s: total written %" PRId64 " took %ld secs\n", dpart, spos, tt1 - tt); + printf("copy: ********* %s: total written %" PRId64 " took %" PRIi64 " secs\n", dpart, spos, (int64_t)(tt1 - tt)); } } /* for all books */ if (onefile) { save_info(minfo, dpart, spos, secsize); time_t tt1 = time(0); - printf("copy: ********* %s: total written %" PRId64 " took %ld secs\n", dpart, spos, tt1 - tt); + printf("copy: ********* %s: total written %" PRId64 " took %" PRIi64 " secs\n", dpart, spos, (int64_t)(tt1 - tt)); } retval = true; ret_err: