Skip to contentSkip to conversation

powerpc: Fix VDSO compile warning

PATCH In review Segher Boessenkool 2 participants 4 messages May 16, 2007 – May 17, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix VDSO compile warning

Maybe the type should have been char[] instead of __u8[] in the first place, but this will do.

---
 arch/powerpc/kernel/vdso.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/vdso.c +1 -1
index 4245579..cef01e4 100644
@@ -670,7 +670,7 @@ static int __init vdso_init(void)
 	/*
 	 * Fill up the "systemcfg" stuff for backward compatiblity
 	 */
-	strcpy(vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
+	strcpy((char *)vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
 	vdso_data->version.major = SYSTEMCFG_MAJOR;
 	vdso_data->version.minor = SYSTEMCFG_MINOR;
 	vdso_data->processor = mfspr(SPRN_PVR);
Signature · 1 line
1.5.2.rc0.g4342-dirty
#1 lore raw
Quoted 3 lines · On Wed, 16 May 2007 17:12:16 +0200 Segher Boessenkool…

Maybe the type should have been char[] instead of __u8[] in the first place, but this will do.

What warning do you get? What compiler version?

I don't get a warning using version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21).

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/

#3 lore raw
In reply to Stephen Rothwell
Quoted 4 lines
Quoted 2 lines

Maybe the type should have been char[] instead of __u8[] in the first place, but this will do.

What warning do you get?

Oh sorry, should have mentioned that:

arch/powerpc/kernel/vdso.c: In function 'vdso_init':
arch/powerpc/kernel/vdso.c:673: warning: passing argument
1 of 'strcpy' from incompatible pointer type

Quoted 1 line

What compiler version?

GCC mainline of two days ago.

Segher