2004-06-19 11:35:56

by John Cherry

[permalink] [raw]
Subject: IA32 (2.6.7 - 2004-06-18.22.30) - 2 New warnings (gcc 3.2.2)

drivers/net/cs89x0.c:166: warning: `netcard_portlist' defined but not used
drivers/video/tdfxfb.c:1104: warning: initialization discards qualifiers from pointer target type


2004-06-19 12:31:30

by Jesper Juhl

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

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 <[email protected]>

--- 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 <[email protected]>