Skip to contentSkip to conversation

IA32 (2.6.5 - 2004-04-12.22.30) - 2 New warnings (gcc 3.2.2)

DISCUSSION John Cherry 2 participants 3 messages Apr 13, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

drivers/char/cyclades.c:686: warning: cy_get_user' defined but not used drivers/video/fbmem.c:914: warning: passing arg 1 of copy_from_user' discards qualifiers from pointer target type

#1 lore raw
Quoted 1 line

drivers/char/cyclades.c:686: warning: `cy_get_user' defined but not used

I sent a patch for this to the janitor's list.

Signature · 2 lines
Don Koch
http://www.krl.com/
#2 lore raw
In reply to John Cherry
Quoted 1 line

drivers/video/fbmem.c:914: warning: passing arg 1 of `copy_from_user' discards qualifiers from pointer target type

The following patch fixes the warning - the "data" field is "const" for apparently varying definitions of the word "const" ;-).

===== fbmem.c 1.95 vs edited =====

fbmem.c renamed from drivers/video/fbmem.c +1 -1
@@ -911,7 +911,7 @@
 			return -ENOMEM;
 		}
 		
-		if (copy_from_user(cursor.image.data, sprite->image.data, size) ||
+		if (copy_from_user((char *)cursor.image.data, sprite->image.data, size) ||
 		    copy_from_user(cursor.mask, sprite->mask, size)) { 
 			kfree(cursor.image.data);
 			kfree(cursor.mask);