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

From: Don Koch
Date: Tue Apr 13 2004 - 13:14:23 EST


> 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 =====
--- 1.94/drivers/video/fbmem.c Thu Mar 25 12:57:01 2004
+++ edited/fbmem.c Tue Apr 13 13:17:56 2004
@@ -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);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/