]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Eliminate gcc 4 'used uninitialized' warnings in drivers/qe/uccf.c
authorKim Phillips <kim.phillips@freescale.com>
Wed, 29 Nov 2006 05:28:33 +0000 (23:28 -0600)
committerKim Phillips <kim.phillips@freescale.com>
Wed, 29 Nov 2006 05:34:30 +0000 (23:34 -0600)
give initial values for reg_num, shift, p_cmxucr in ucc_set_clk_src
since they are passed by reference to ucc_get_cmxucr_reg and assigned.

drivers/qe/uccf.c

index 25f74826c00a2f2fbf5e862340b602eb8c6a05a0..013aa543dbcdea4a8f4d937705067c4f5bebf487 100644 (file)
@@ -100,9 +100,9 @@ static void ucc_get_cmxucr_reg(int ucc_num, volatile u32 **p_cmxucr,
 
 static int ucc_set_clk_src(int ucc_num, qe_clock_e clock, comm_dir_e mode)
 {
-       volatile u32    *p_cmxucr;
-       u8              reg_num;
-       u8              shift;
+       volatile u32    *p_cmxucr = NULL;
+       u8              reg_num = 0;
+       u8              shift = 0;
        u32             clockBits;
        u32             clockMask;
        int             source = -1;