aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-06-08 12:35:06 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-06-08 12:35:06 +0200
commit3e463e1cfd8d6c42b4ee866723f84ca8adb32da7 (patch)
treec9a1470238521add273d882eecebfe475c43e011
parent023ae75fc663d7978ea43e073be6f50b39f1f196 (diff)
downloadbusybox-w32-3e463e1cfd8d6c42b4ee866723f84ca8adb32da7.tar.gz
busybox-w32-3e463e1cfd8d6c42b4ee866723f84ca8adb32da7.tar.bz2
busybox-w32-3e463e1cfd8d6c42b4ee866723f84ca8adb32da7.zip
brctl: placate compiler warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/brctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/networking/brctl.c b/networking/brctl.c
index f44ad9c8d..cbdc7c6b1 100644
--- a/networking/brctl.c
+++ b/networking/brctl.c
@@ -120,6 +120,7 @@ static int read_file(const char *name)
120 return n; 120 return n;
121} 121}
122 122
123#if ENABLE_FEATURE_BRCTL_SHOW
123/* NB: we are in /sys/class/net 124/* NB: we are in /sys/class/net
124 */ 125 */
125static int show_bridge(const char *name, int need_hdr) 126static int show_bridge(const char *name, int need_hdr)
@@ -176,7 +177,9 @@ static int show_bridge(const char *name, int need_hdr)
176 bb_putchar('\n'); 177 bb_putchar('\n');
177 return 0; 178 return 0;
178} 179}
180#endif
179 181
182#if ENABLE_FEATURE_BRCTL_FANCY
180static void write_uint(const char *name, const char *leaf, unsigned val) 183static void write_uint(const char *name, const char *leaf, unsigned val)
181{ 184{
182 char pathbuf[IFNAMSIZ + sizeof("/bridge/bridge_id") + 32]; 185 char pathbuf[IFNAMSIZ + sizeof("/bridge/bridge_id") + 32];
@@ -193,6 +196,7 @@ static void write_uint(const char *name, const char *leaf, unsigned val)
193 bb_simple_perror_msg_and_die(name); 196 bb_simple_perror_msg_and_die(name);
194 close(fd); 197 close(fd);
195} 198}
199#endif
196 200
197int brctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 201int brctl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
198int brctl_main(int argc UNUSED_PARAM, char **argv) 202int brctl_main(int argc UNUSED_PARAM, char **argv)