]> git.sur5r.net Git - u-boot/commitdiff
QE: fix compile warning
authorDave Liu <r63238@freescale.com>
Mon, 14 Jan 2008 03:12:01 +0000 (11:12 +0800)
committerWolfgang Denk <wd@denx.de>
Mon, 14 Jan 2008 09:34:30 +0000 (10:34 +0100)
qe.c: In function 'qe_upload_firmware':
qe.c:390: warning: pointer targets in passing argument 2
uec.c: In function 'uec_initialize':
uec.c:1236: warning: 'uec_info' may be used uninitialized

Signed-off-by: Dave Liu <daveliu@freescale.com>
drivers/qe/qe.c
drivers/qe/uec.c

index c802014a50bfc259a51fb6433019fce820d1eeb9..63acfa3d15e5357ad27b011dd192ffe4f1dbcfed 100644 (file)
@@ -387,7 +387,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
         * saved microcode information and put in the new.
         */
        memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
-       strcpy(qe_firmware_info.id, firmware->id);
+       strcpy(qe_firmware_info.id, (char *)firmware->id);
        qe_firmware_info.extended_modes = firmware->extended_modes;
        memcpy(qe_firmware_info.vtraps, firmware->vtraps,
                sizeof(firmware->vtraps));
index 44cbea5785623d040a3bf432e47027db34c4edc3..6cb25bfbc1aaf732010479f5ef53a452cd35454f 100644 (file)
@@ -1249,6 +1249,7 @@ int uec_initialize(int index)
        memset(uec, 0, sizeof(uec_private_t));
 
        /* Init UEC private struct, they come from board.h */
+       uec_info = NULL;
        if (index == 0) {
 #ifdef CONFIG_UEC_ETH1
                uec_info = &eth1_uec_info;