[vlc-commits] v4l2: fix format warnings

Rémi Denis-Courmont git at videolan.org
Sun Apr 13 09:33:52 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 13 10:32:33 2014 +0300| [fed414c4bcbb6ac7b2819fb6a4ecd1e29ea7bf0b] | committer: Rémi Denis-Courmont

v4l2: fix format warnings

GCC and Linux do not agree on the underlying type -long or long long-
for fixed size 64-bits integer on 64-bits architectures.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fed414c4bcbb6ac7b2819fb6a4ecd1e29ea7bf0b
---

 modules/access/v4l2/controls.c |    5 +++--
 modules/access/v4l2/video.c    |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/access/v4l2/controls.c b/modules/access/v4l2/controls.c
index f24a716..1d2b104 100644
--- a/modules/access/v4l2/controls.c
+++ b/modules/access/v4l2/controls.c
@@ -683,11 +683,12 @@ static vlc_v4l2_ctrl_t *ControlAddIntMenu (vlc_object_t *obj, int fd,
 
         if (v4l2_ioctl (fd, VIDIOC_QUERYMENU, &menu) < 0)
             continue;
-        msg_Dbg (obj, "  choice %"PRIu32") %"PRId64, menu.index, menu.value);
+        msg_Dbg (obj, "  choice %"PRIu32") %"PRId64, menu.index,
+                 (uint64_t)menu.value);
 
         vlc_value_t text;
         val.i_int = menu.index;
-        sprintf (name, "%"PRId64, menu.value);
+        sprintf (name, "%"PRId64, (int64_t)menu.value);
         text.psz_string = name;
         var_Change (obj, c->name, VLC_VAR_ADDCHOICE, &val, &text);
     }
diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index efd3c66..fe5d1c9 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -61,11 +61,11 @@ static int SetupStandard (vlc_object_t *obj, int fd,
     }
     if (v4l2_ioctl (fd, VIDIOC_S_STD, std) < 0)
     {
-        msg_Err (obj, "cannot set video standard 0x%"PRIx64": %s", *std,
-                 vlc_strerror_c(errno));
+        msg_Err (obj, "cannot set video standard 0x%"PRIx64": %s",
+                 (uint64_t)*std, vlc_strerror_c(errno));
         return -1;
     }
-    msg_Dbg (obj, "video standard set to 0x%"PRIx64":", *std);
+    msg_Dbg (obj, "video standard set to 0x%"PRIx64":", (uint64_t)*std);
     return 0;
 }
 



More information about the vlc-commits mailing list