There is no guarantee that the backing value for the various time fields
are ints or longs which makes printfs annoying.  Lets cast them to the
uintmax_t type so we can use the j flag and not worry about truncation.

* v4l2.c (v4l2_ioctl): Use j and uintmax_t when printing tv_sec/tv_usec.
---
 v4l2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/v4l2.c b/v4l2.c
index 88b0532..ae1ebb8 100644
--- a/v4l2.c
+++ b/v4l2.c
@@ -633,9 +633,9 @@ v4l2_ioctl(struct tcb *tcp, const unsigned int code, long 
arg)
                                        b.length, b.bytesused);
                                printflags(v4l2_buf_flags, b.flags, 
"V4L2_BUF_FLAG_???");
                                if (code == VIDIOC_DQBUF)
-                                       tprintf(", timestamp = {%lu.%06lu}",
-                                               b.timestamp.tv_sec,
-                                               b.timestamp.tv_usec);
+                                       tprintf(", timestamp = {%ju.%06ju}",
+                                               (uintmax_t)b.timestamp.tv_sec,
+                                               (uintmax_t)b.timestamp.tv_usec);
                                tprints(", ...");
                        }
                        tprints("}");
-- 
2.3.0


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to