diff --git a/camera/drivers/video4linux2.c b/camera/drivers/video4linux2.c index f649a8b88e..4dca67ee90 100644 --- a/camera/drivers/video4linux2.c +++ b/camera/drivers/video4linux2.c @@ -96,7 +96,7 @@ static bool init_mmap(void *data) req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; req.memory = V4L2_MEMORY_MMAP; - if (xioctl(v4l->fd, VIDIOC_REQBUFS, &req) == -1) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_REQBUFS, &req) == -1) { if (errno == EINVAL) RARCH_ERR("%s does not support memory mapping.\n", v4l->dev_name); @@ -129,7 +129,7 @@ static bool init_mmap(void *data) buf.memory = V4L2_MEMORY_MMAP; buf.index = v4l->n_buffers; - if (xioctl(v4l->fd, VIDIOC_QUERYBUF, &buf) == -1) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYBUF, &buf) == -1) { RARCH_ERR("Error - xioctl VIDIOC_QUERYBUF.\n"); return false; @@ -159,7 +159,7 @@ static bool init_device(void *data) struct v4l2_format fmt; video4linux_t *v4l = (video4linux_t*)data; - if (xioctl(v4l->fd, VIDIOC_QUERYCAP, &cap) < 0) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_QUERYCAP, &cap) < 0) { if (errno == EINVAL) RARCH_ERR("%s is no V4L2 device.\n", v4l->dev_name); @@ -184,7 +184,7 @@ static bool init_device(void *data) memset(&cropcap, 0, sizeof(cropcap)); cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - if (xioctl(v4l->fd, VIDIOC_CROPCAP, &cropcap) == 0) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_CROPCAP, &cropcap) == 0) { crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; crop.c = cropcap.defrect; @@ -200,7 +200,7 @@ static bool init_device(void *data) fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; fmt.fmt.pix.field = V4L2_FIELD_NONE; - if (xioctl(v4l->fd, VIDIOC_S_FMT, &fmt) < 0) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_S_FMT, &fmt) < 0) { RARCH_ERR("Error - VIDIOC_S_FMT\n"); return false; @@ -260,7 +260,7 @@ static bool v4l_start(void *data) buf.memory = V4L2_MEMORY_MMAP; buf.index = i; - if (xioctl(v4l->fd, VIDIOC_QBUF, &buf) == -1) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1) { RARCH_ERR("Error - VIDIOC_QBUF.\n"); return false; @@ -385,7 +385,7 @@ static bool preprocess_image(void *data) buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; - if (xioctl(v4l->fd, VIDIOC_DQBUF, &buf) == -1) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_DQBUF, &buf) == -1) { switch (errno) { @@ -401,7 +401,7 @@ static bool preprocess_image(void *data) process_image(v4l, (const uint8_t*)v4l->buffers[buf.index].start); - if (xioctl(v4l->fd, VIDIOC_QBUF, &buf) == -1) + if (xioctl(v4l->fd, (uint8_t)VIDIOC_QBUF, &buf) == -1) RARCH_ERR("VIDIOC_QBUF\n"); return true;