* [PATCH] net: fix warning about non-const string
@ 2009-03-09 23:51 Stephen Hemminger
0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2009-03-09 23:51 UTC (permalink / raw)
To: netdev
Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- 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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-09 23:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 23:51 [PATCH] net: fix warning about non-const string Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).