This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: Fix new compiler warnings thrown by gcc-4.6
Author:  Hans de Goede <[email protected]>
Date:    Wed Feb 9 22:02:35 2011 +0100

And fix 2 real bugs pointed out by these warnings!

Signed-off-by: Hans de Goede <[email protected]>

 lib/libv4l1/libv4l1.c                   |    2 +-
 lib/libv4lconvert/ov518-decomp.c        |    3 +--
 lib/libv4lconvert/sq905c.c              |    3 +--
 lib/libv4lconvert/tinyjpeg.c            |    6 ++----
 utils/keytable/keytable.c               |    2 +-
 utils/v4l2-ctl/v4l2-ctl.cpp             |    2 +-
 utils/v4l2-sysfs-path/v4l2-sysfs-path.c |    2 --
 7 files changed, 7 insertions(+), 13 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=0225e314ffa9dcb32a2d32cac24fc715d530c1ab

diff --git a/lib/libv4l1/libv4l1.c b/lib/libv4l1/libv4l1.c
index 7f179c2..3774cda 100644
--- a/lib/libv4l1/libv4l1.c
+++ b/lib/libv4l1/libv4l1.c
@@ -399,7 +399,7 @@ int v4l1_open(const char *file, int oflag, ...)
                devices[index].flags |= V4L1_SUPPORTS_ENUMINPUT;
 
        standard2.index = 0;
-       if (v4l2_ioctl(fd, VIDIOC_ENUMSTD, &input2) == 0)
+       if (v4l2_ioctl(fd, VIDIOC_ENUMSTD, &standard2) == 0)
                devices[index].flags |= V4L1_SUPPORTS_ENUMSTD;
 
        V4L1_LOG("open: %d\n", fd);
diff --git a/lib/libv4lconvert/ov518-decomp.c b/lib/libv4lconvert/ov518-decomp.c
index 937f6cf..47b5cbb 100644
--- a/lib/libv4lconvert/ov518-decomp.c
+++ b/lib/libv4lconvert/ov518-decomp.c
@@ -791,14 +791,13 @@ DCT_8x4(int *coeff, unsigned char *out)
 {
        register int base, val1, val2, val3;
        int tmp1, tmp2;
-       int C0, C4, C16, C20;
+       int C4, C16, C20;
        int C2_18, C6_22, C1_17, C3_19, C5_21, C7_23;
        register int t;
 #ifdef APPROXIMATE_MUL_BY_SHIFT
        register int x;
 #endif
 
-       C0 = coeff[0];
        C4 = coeff[4];
        C16 = coeff[16];
        C20 = coeff[20];
diff --git a/lib/libv4lconvert/sq905c.c b/lib/libv4lconvert/sq905c.c
index 9e4989d..8194342 100644
--- a/lib/libv4lconvert/sq905c.c
+++ b/lib/libv4lconvert/sq905c.c
@@ -103,7 +103,7 @@ sq905c_second_decompress(unsigned char *uncomp, unsigned 
char *in,
 {
        int diff = 0;
        int tempval = 0;
-       int i, m, parity;
+       int i, m;
        unsigned char delta_left = 0;
        unsigned char delta_right = 0;
        int input_counter = 0;
@@ -139,7 +139,6 @@ sq905c_second_decompress(unsigned char *uncomp, unsigned 
char *in,
        for (m = 0; m < height / 2; m++) {
                /* First we do an even-numbered line */
                for (i = 0; i < width / 2; i++) {
-                       parity = i & 1;
                        delta_right = in[input_counter] & 0x0f;
                        delta_left = (in[input_counter] >> 4) & 0xff;
                        input_counter++;
diff --git a/lib/libv4lconvert/tinyjpeg.c b/lib/libv4lconvert/tinyjpeg.c
index 0768d9e..e308f63 100644
--- a/lib/libv4lconvert/tinyjpeg.c
+++ b/lib/libv4lconvert/tinyjpeg.c
@@ -422,7 +422,6 @@ static int build_huffman_table(struct jdec_private *priv, 
const unsigned char *b
        unsigned int i, j, code, code_size, val, nbits;
        unsigned char huffsize[257], *hz;
        unsigned int huffcode[257], *hc;
-       int next_free_entry;
        int slowtable_used[16 - HUFFMAN_HASH_NBITS];
 
        /*
@@ -459,7 +458,6 @@ static int build_huffman_table(struct jdec_private *priv, 
const unsigned char *b
        /*
         * Build the lookup table, and the slowtable if needed.
         */
-       next_free_entry = -1;
        for (i = 0; huffsize[i]; i++) {
                val = vals[i];
                code = huffcode[i];
@@ -1543,8 +1541,8 @@ static void decode_MCU_1x2_1plane(struct jdec_private 
*priv)
 
 static void print_SOF(const unsigned char *stream)
 {
-       int width, height, nr_components, precision;
 #if DEBUG
+       int width, height, nr_components, precision;
        const char *nr_components_to_string[] = {
                "????",
                "Grayscale",
@@ -1552,7 +1550,6 @@ static void print_SOF(const unsigned char *stream)
                "YCbCr",
                "CYMK"
        };
-#endif
 
        precision = stream[2];
        height = be16_to_cpu(stream + 3);
@@ -1564,6 +1561,7 @@ static void print_SOF(const unsigned char *stream)
                        width, height,
                        nr_components, nr_components_to_string[nr_components],
                        precision);
+#endif
 }
 
 
/*******************************************************************************
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index 0224492..c406a18 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -1090,7 +1090,7 @@ static int get_attribs(struct rc_device *rc_dev, char 
*sysfs_name)
 
 static int set_proto(struct rc_device *rc_dev)
 {
-       int rc;
+       int rc = 0;
 
        if (rc_dev->version == VERSION_2) {
                rc = v2_set_protocols(rc_dev);
diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp
index da2469c..3db26ab 100644
--- a/utils/v4l2-ctl/v4l2-ctl.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl.cpp
@@ -2599,7 +2599,7 @@ int main(int argc, char **argv)
                parm.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
                parm.parm.output.timeperframe.numerator = 1000;
                parm.parm.output.timeperframe.denominator =
-                       fps * parm.parm.output.timeperframe.numerator;
+                       output_fps * parm.parm.output.timeperframe.numerator;
 
                if (doioctl(fd, VIDIOC_S_PARM, &parm) == 0) {
                        struct v4l2_fract *tf = &parm.parm.output.timeperframe;
diff --git a/utils/v4l2-sysfs-path/v4l2-sysfs-path.c 
b/utils/v4l2-sysfs-path/v4l2-sysfs-path.c
index a2f4d53..b8de51d 100644
--- a/utils/v4l2-sysfs-path/v4l2-sysfs-path.c
+++ b/utils/v4l2-sysfs-path/v4l2-sysfs-path.c
@@ -142,7 +142,6 @@ static char *seek_name(char *path, char *match)
 {
        DIR             *dir;
        struct dirent   *entry;
-       char            *p;
        static char     name[1024];
 
        dir = opendir(path);
@@ -151,7 +150,6 @@ static char *seek_name(char *path, char *match)
 
        strcpy(name, path);
        strcat(name, "/");
-       p = name + strlen(name);
 
        entry = readdir(dir);
        while (entry) {

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to