From 19645e4f147bfe45857c441ba7ed3d3818dab41e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 2 Sep 2024 21:06:01 +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. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b8d13a1f7b97d1d1bea437b03ac0715cffbda8ed Author: Thilo Graf Date: 2024-09-02 (Mon, 02 Sep 2024) Origin message was: ------------------ 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. ------------------ This commit was generated by Migit --- 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: