From: Stephen Hemminger <shemminger@vyatta.com>
To: netdev@vger.kernel.org
Subject: [PATCH] net: fix warning about non-const string
Date: Mon, 9 Mar 2009 16:51:55 -0700 [thread overview]
Message-ID: <20090309165155.187776c0@nehalam> (raw)
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;
reply other threads:[~2009-03-09 23:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090309165155.187776c0@nehalam \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).