diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-20 11:29:00 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-20 11:29:00 +0100 |
commit | b3b6c8bdf23d30c57d92458f1aac93ce84bf81a7 (patch) | |
tree | 09f864fc85a6743e218d7cb61496d4dfeb946050 /networking/ifplugd.c | |
parent | 53f30b41ec252d9973719b349a644477e72e1a09 (diff) | |
download | busybox-w32-b3b6c8bdf23d30c57d92458f1aac93ce84bf81a7.tar.gz busybox-w32-b3b6c8bdf23d30c57d92458f1aac93ce84bf81a7.tar.bz2 busybox-w32-b3b6c8bdf23d30c57d92458f1aac93ce84bf81a7.zip |
eliminate aliasing warning in networking/route.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ifplugd.c')
-rw-r--r-- | networking/ifplugd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 3b59a63ff..8dd0a5bd8 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c | |||
@@ -133,7 +133,8 @@ static smallint detect_link_mii(void) | |||
133 | { | 133 | { |
134 | /* char buffer instead of bona-fide struct avoids aliasing warning */ | 134 | /* char buffer instead of bona-fide struct avoids aliasing warning */ |
135 | char buf[sizeof(struct ifreq)]; | 135 | char buf[sizeof(struct ifreq)]; |
136 | struct ifreq *ifreq = (void *)buf; | 136 | struct ifreq *const ifreq = (void *)buf; |
137 | |||
137 | struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; | 138 | struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; |
138 | 139 | ||
139 | set_ifreq_to_ifname(ifreq); | 140 | set_ifreq_to_ifname(ifreq); |
@@ -155,7 +156,8 @@ static smallint detect_link_priv(void) | |||
155 | { | 156 | { |
156 | /* char buffer instead of bona-fide struct avoids aliasing warning */ | 157 | /* char buffer instead of bona-fide struct avoids aliasing warning */ |
157 | char buf[sizeof(struct ifreq)]; | 158 | char buf[sizeof(struct ifreq)]; |
158 | struct ifreq *ifreq = (void *)buf; | 159 | struct ifreq *const ifreq = (void *)buf; |
160 | |||
159 | struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; | 161 | struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; |
160 | 162 | ||
161 | set_ifreq_to_ifname(ifreq); | 163 | set_ifreq_to_ifname(ifreq); |