DORMANTno replies

[PATCH] net: fix warning about non-const string

From: Stephen Hemminger <hidden>
Date: 2009-03-09 23:51:58

Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.

Signed-off-by: Stephen Hemminger <redacted>
--- a/net/core/net-sysfs.c	2009-03-09 08:23:45.573308957 -0700
+++ b/net/core/net-sysfs.c	2009-03-09 16:47:46.640356108 -0700
@@ -498,7 +498,7 @@ int netdev_register_kobject(struct net_d
 	dev->groups = groups;
 
 	BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
-	dev_set_name(dev, net->name);
+	dev_set_name(dev, "%s", net->name);
 
 #ifdef CONFIG_SYSFS
 	*groups++ = &netstat_group;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help