From: Mauro Carvalho Chehab Date: Sat, 27 Oct 2012 19:30:20 +0000 (-0300) Subject: [media] usbvision-core: fix a warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=534d032601b1e274da0f0297c1312e79e56344a9;p=openwrt%2Fstaging%2Fblogic.git [media] usbvision-core: fix a warning drivers/media/usb/usbvision/usbvision-core.c:1749:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/usbvision/usbvision.h b/drivers/media/usb/usbvision/usbvision.h index 43cf61fe4943..8a25876d72c6 100644 --- a/drivers/media/usb/usbvision/usbvision.h +++ b/drivers/media/usb/usbvision/usbvision.h @@ -167,7 +167,7 @@ enum { /* This macro restricts an int variable to an inclusive range */ #define RESTRICT_TO_RANGE(v, mi, ma) \ - { if ((v) < (mi)) (v) = (mi); else if ((v) > (ma)) (v) = (ma); } + { if (((int)v) < (mi)) (v) = (mi); else if ((v) > (ma)) (v) = (ma); } /* * We use macros to do YUV -> RGB conversion because this is