Fix warning in tdfxfb.c (Was: Re: IA32 (2.6.7 - 2004-06-18.22.30)- 2 New warnings (gcc 3.2.2))

From: Jesper Juhl
Date: Sat Jun 19 2004 - 07:32:58 EST


On Sat, 19 Jun 2004, John Cherry wrote:

> drivers/video/tdfxfb.c:1104: warning: initialization discards qualifiers from pointer target type

Here's a patch for that.

The issue is that the mask member of struct fb_cursor is const, so
we shouldn't be assigning it to a non-const char*

Signed-off-by: Jesper Juhl <juhl-lkml@xxxxxx>

--- linux-2.6.7-orig/drivers/video/tdfxfb.c 2004-06-16 07:19:02.000000000 +0200
+++ linux-2.6.7/drivers/video/tdfxfb.c 2004-06-19 14:25:16.000000000 +0200
@@ -1101,7 +1101,7 @@ static int tdfxfb_cursor(struct fb_info
*/
u8 *cursorbase = (u8 *) info->cursor.image.data;
char *bitmap = (char *)cursor->image.data;
- char *mask = cursor->mask;
+ const char *mask = cursor->mask;
int i, j, k, h = 0;

for (i = 0; i < 64; i++) {


--
Jesper Juhl <juhl-lkml@xxxxxx>

-
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/