vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Mar 1 11:52:46 2015 +0200| [ab8b6a88654fbe8c0b0664678c07a8191de16bac] | committer: Rémi Denis-Courmont
snapshot: fix format string portability We cannot assume that timeval.tv_usec (i.e. suseconds_t) is long. Reported-by: Ian Chamberlain <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ab8b6a88654fbe8c0b0664678c07a8191de16bac --- src/video_output/snapshot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_output/snapshot.c b/src/video_output/snapshot.c index c8096ef..7b89803 100644 --- a/src/video_output/snapshot.c +++ b/src/video_output/snapshot.c @@ -190,9 +190,9 @@ int vout_snapshot_SaveImage(char **name, int *sequential, &curtime) == 0) strcpy(buffer, "error"); - if (asprintf(&filename, "%s" DIR_SEP "%s%s%03lu.%s", - cfg->path, prefix, buffer, tv.tv_usec / 1000, - cfg->format) < 0) + if (asprintf(&filename, "%s" DIR_SEP "%s%s%03u.%s", + cfg->path, prefix, buffer, + (unsigned)tv.tv_usec / 1000, cfg->format) < 0) filename = NULL; } free(prefix); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
