Skip to contentSkip to conversation

drivers: video: console: fbcon_cw: fix compiler warning in cw_update_attr

PATCH Superseded Devendra Naga 1 participant 1 message Mar 8, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 drivers: video: console: fbcon_cw: fix compiler warning in cw_update_attr

with make W=1

saw

drivers/video/console/fbcon_cw.c: In function ‘cw_update_attr’:
drivers/video/console/fbcon_cw.c:30:8: warning: variable ‘t’ set but not used [-Wunused-but-set-variable]

fixed by removing as since its used nowhere

Cc Antonino A. Daplas <[email protected]>
---
 drivers/video/console/fbcon_cw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/console/fbcon_cw.c +1 -2
index 6a73782..a93670e 100644
@@ -27,7 +27,7 @@ static void cw_update_attr(u8 *dst, u8 *src, int attribute,
 {
 	int i, j, offset = (vc->vc_font.height < 10) ? 1 : 2;
 	int width = (vc->vc_font.height + 7) >> 3;
-	u8 c, t = 0, msk = ~(0xff >> offset);
+	u8 c, msk = ~(0xff >> offset);
 
 	for (i = 0; i < vc->vc_font.width; i++) {
 		for (j = 0; j < width; j++) {
@@ -40,7 +40,6 @@ static void cw_update_attr(u8 *dst, u8 *src, int attribute,
 				c = ~c;
 			src++;
 			*dst++ = c;
-			t = c;
 		}
 	}
 }
Signature · 1 line
1.8.1.2