]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00290635-2 IPUv3 stripe:Fix a build warning
authorLiu Ying <Ying.Liu@freescale.com>
Wed, 4 Dec 2013 03:48:27 +0000 (11:48 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 16 Jun 2014 16:09:03 +0000 (18:09 +0200)
This patch fixes the following build warning by
initializing some local variables:
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c: In function ‘ipu_calc_stripes_sizes’:
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘difwr’ may be used uninitialized in this function [-Wuninitialized]
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘onw’ may be used uninitialized in this function [-Wuninitialized]
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c:393:3: warning: ‘inw’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/mxc/ipu3/ipu_calc_stripes_sizes.c

index 78849c2788eb7491c3ccca411628e9d956ff305e..5bd543b049a1b826a6d71785eecb02be9f07fdf7 100644 (file)
@@ -250,13 +250,13 @@ int ipu_calc_stripes_sizes(const unsigned int input_frame_width,
        unsigned int status;
        unsigned int temp;
        unsigned int onw_min;
-       unsigned int inw, onw, inw_best = 0;
+       unsigned int inw = 0, onw = 0, inw_best = 0;
        /* number of pixels in the left stripe NOT hidden by the right stripe */
        u64 irr_opt; /* the optimal inverse resizing ratio */
        u64 rr_opt; /* the optimal resizing ratio = 1/irr_opt*/
        u64 dinw; /* the misalignment between the stripes */
        /* (measured in units of input columns) */
-       u64 difwl, difwr;
+       u64 difwl, difwr = 0;
        /* The number of input columns not reflected in the output */
        /* the resizing ratio used for the right stripe is */
        /*   left->irr and right->irr respectively */