diff options
author | Thierry MERLE <thierry.merle@free.fr> | 2008-07-04 19:30:13 +0200 |
---|---|---|
committer | Thierry MERLE <thierry.merle@free.fr> | 2008-07-04 19:30:13 +0200 |
commit | 63c4e4bef7b1537de4e313ee9d20907a372d8f56 (patch) | |
tree | 75117f0820d55998bcae2e4bfac9647781ed4e61 /v4l2-apps/lib/libv4l/libv4l1 | |
parent | 40536a32a310338da9cf2c697dd978780aeda18a (diff) | |
download | mediapointer-dvb-s2-63c4e4bef7b1537de4e313ee9d20907a372d8f56.tar.gz mediapointer-dvb-s2-63c4e4bef7b1537de4e313ee9d20907a372d8f56.tar.bz2 |
v4l2-library: libv4l-warnings.patch
From: Hans de Goede <j.w.r.degoede@hhs.nl>
Fix all compiler warnings in libv4l
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h | 2 | ||||
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l1/libv4l1.c | 13 | ||||
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h index 7caff68a9..e107581d1 100644 --- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h +++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1-priv.h @@ -64,7 +64,7 @@ struct v4l1_dev_info { unsigned int v4l1_pal; /* VIDEO_PALETTE */ unsigned int v4l2_pixfmt; /* V4L2_PIX_FMT */ unsigned int min_width, min_height, max_width, max_height; - int width, height; + unsigned int width, height; unsigned char *v4l1_frame_pointer; }; diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c index f0604e5c9..7f5e79e3d 100644 --- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c +++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c @@ -70,9 +70,10 @@ #define V4L1_PIX_SIZE_TOUCHED 0x08 static pthread_mutex_t v4l1_open_mutex = PTHREAD_MUTEX_INITIALIZER; -static struct v4l1_dev_info devices[V4L1_MAX_DEVICES] = { {-1}, {-1}, {-1}, - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, - {-1} }; +static struct v4l1_dev_info devices[V4L1_MAX_DEVICES] = { { .fd = -1 }, + { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, + { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, + { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }, { .fd = -1 }}; static int devices_used = 0; static unsigned int palette_to_pixelformat(unsigned int palette) @@ -135,8 +136,8 @@ static unsigned int pixelformat_to_palette(unsigned int pixelformat) return 0; } -static int v4l1_set_format(int index, int width, int height, - int v4l1_pal, int width_height_may_differ) +static int v4l1_set_format(int index, unsigned int width, + unsigned int height, int v4l1_pal, int width_height_may_differ) { int result; unsigned int v4l2_pixfmt; @@ -748,7 +749,7 @@ ssize_t v4l1_read(int fd, void* buffer, size_t n) void *v4l1_mmap(void *start, size_t length, int prot, int flags, int fd, - off_t offset) + __off_t offset) { int index; void *result; diff --git a/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c b/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c index 3300d56d9..4a4e5c253 100644 --- a/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c +++ b/v4l2-apps/lib/libv4l/libv4l1/v4l1compat.c @@ -77,7 +77,7 @@ ssize_t read(int fd, void* buffer, size_t n) } void mmap(void *start, size_t length, int prot, int flags, int fd, - off_t offset) + __off_t offset) { return v4l1_mmap(start, length, prot, flags, fd, offset); } |