Skip to contentSkip to conversation

Fix compilation warning for drivers/input/touchscreen/htcpen.c

PATCH RESEND In review Subrata Modak 2 participants 2 messages Jul 21, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 4/6 Fix compilation warning for drivers/input/touchscreen/htcpen.c

gcc 4.4.1 generates the following build warning on i386:

CC drivers/input/touchscreen/htcpen.o drivers/input/touchscreen/htcpen.c:50: warning: 'pnp_ids' defined but not used

Fix this by removing the static keyword when you are actually exporting that structure. This patch was earlier posted on 14th July 2009:
http://lkml.org/lkml/2009/7/14/362,

---

drivers/input/touchscreen/htcpen.c +1 -1
@@ -47,7 +47,7 @@ static int invert_y;
 module_param(invert_y, bool, 0644);
 MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted");
 
-static struct pnp_device_id pnp_ids[] = {
+struct pnp_device_id pnp_ids[] = {
 	{ .id = "PNP0cc0" },
 	{ .id = "" }
 };

---
Regards--
Subrata

maintainer
#1 lore raw

Hi Subrata,

Quoted 10 lines · Subrata Modak

gcc 4.4.1 generates the following build warning on i386:

CC drivers/input/touchscreen/htcpen.o drivers/input/touchscreen/htcpen.c:50: warning: 'pnp_ids' defined but not used

Fix this by removing the static keyword when you are actually exporting that structure. This patch was earlier posted on 14th July 2009:
http://lkml.org/lkml/2009/7/14/362,

Umm, no, we don't export this particular structure, we are exporting another structure referencing this. Are you compiling without module support by any chance?

Quoted 14 lines

---

drivers/input/touchscreen/htcpen.c +1 -1
@@ -47,7 +47,7 @@ static int invert_y;
 module_param(invert_y, bool, 0644);
 MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted");
 
-static struct pnp_device_id pnp_ids[] = {
+struct pnp_device_id pnp_ids[] = {
 	{ .id = "PNP0cc0" },
 	{ .id = "" }
 };
Signature · 1 line
Dmitry