Skip to contentSkip to conversation

QE: fix compile warning

PATCH New Dave Liu 2 participants 2 messages Jan 14, 2008

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH 1/1 QE: fix compile warning

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

---
 drivers/qe/qe.c  |    2 +-
 drivers/qe/uec.c |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/qe/qe.c +1 -1
index c802014..63acfa3 100644
@@ -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));
drivers/qe/uec.c +1 -0
index 44cbea5..6cb25bf 100644
@@ -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;
Signature · 1 line
1.5.3.5.643.g40e25
#1 lore raw

PATCH 1/1 QE: fix compile warning

Quoted 6 lines · In message <[email protected]> you wrote:

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

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
After a time, you may find that "having" is not so pleasing a thing,
after all, as "wanting."  It is not logical, but it is often true.
	-- Spock, "Amok Time", stardate 3372.7