Fix warning because of wrong time_t format specifier on FreeBSD i386

and fix places where format specifier is hardcoded for time_t and
correctly use PRItime_t instead.

src/epg.c:1412: warning: format '%ld' expects type 'long int', but argument 7 has type 'time_t'
src/dvr/dvr_rec.c:596: warning: format '%ld' expects type 'long int', but argument 4 has type 'time_t'
src/epggrab/module/eit.c:536: warning: format '%lu' expects type 'long unsigned int', but argument 8 has type 'time_t'
This commit is contained in:
Bernhard Froehlich 2013-05-24 21:34:53 +02:00
parent ae7d281898
commit 1a458ae763
3 changed files with 7 additions and 3 deletions

View file

@ -593,8 +593,8 @@ dvr_spawn_postproc(dvr_entry_t *de, const char *dvr_postproc)
}
fbasename = strdup(de->de_filename);
snprintf(start, sizeof(start), "%ld", de->de_start - de->de_start_extra);
snprintf(stop, sizeof(stop), "%ld", de->de_stop + de->de_stop_extra);
snprintf(start, sizeof(start), "%"PRItime_t, de->de_start - de->de_start_extra);
snprintf(stop, sizeof(stop), "%"PRItime_t, de->de_stop + de->de_stop_extra);
memset(fmap, 0, sizeof(fmap));
fmap['f'] = de->de_filename; /* full path to recoding */

View file

@ -533,7 +533,7 @@ static int _eit_process_event
/* Find broadcast */
ebc = epg_broadcast_find_by_time(svc->s_ch, start, stop, eid, 1, &save2);
tvhtrace("eit", "eid=%5d, start=%lu, stop=%lu, ebc=%p",
tvhtrace("eit", "eid=%5d, start=%"PRItime_t", stop=%"PRItime_t", ebc=%p",
eid, start, stop, ebc);
if (!ebc) return dllen + 12;

View file

@ -561,7 +561,11 @@ char *regexp_escape ( const char *str );
#define PRIulongword_t "lu"
#define PRIsize_t PRIuword_t
#define PRIssize_t PRIsword_t
#if __WORDSIZE == 32 && defined(PLATFORM_FREEBSD)
#define PRItime_t PRIsword_t
#else
#define PRItime_t PRIslongword_t
#endif
#if _FILE_OFFSET_BITS == 64
#define PRIoff_t PRId64
#else