aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2017-12-24 16:39:57 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2017-12-24 16:39:57 +0000
commit96289d09614ec866b95bbf2fd49e4269bb5be9b3 (patch)
treef258a875351554db22647a5ac83301658d4a8deb
parentd76103580a266bcabe4327ab9604ac4da767ecfb (diff)
downloadsrc-96289d09614ec866b95bbf2fd49e4269bb5be9b3.tar.gz
src-96289d09614ec866b95bbf2fd49e4269bb5be9b3.zip
Remove write-only opt and useless optlen variables.
This squashes the warning gebnerated by GCC 6.x. Since variables that are now removed had come documentation value, put relevant bits in comment, so they can be resurrected from there when actually needed.
Notes
Notes: svn path=/head/; revision=327163
-rw-r--r--usr.sbin/efibootmgr/efibootmgr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c
index bec2c415018d..20f9e1dbc5a7 100644
--- a/usr.sbin/efibootmgr/efibootmgr.c
+++ b/usr.sbin/efibootmgr/efibootmgr.c
@@ -707,10 +707,8 @@ print_loadopt_str(uint8_t *data, size_t datalen)
uint8_t *ep = data + datalen;
uint8_t *walker = data;
efidp dp, edp;
- void *opt;
char buf[1024];
int len;
- int optlen;
int rv;
int indent;
@@ -734,10 +732,11 @@ print_loadopt_str(uint8_t *data, size_t datalen)
if (walker > ep)
return;
edp = (efidp)walker;
- // Everything left is the binary option args
- opt = walker;
- optlen = ep - walker;
-
+ /*
+ * Everything left is the binary option args
+ * opt = walker;
+ * optlen = ep - walker;
+ */
indent = 1;
while (dp < edp) {
efidp_format_device_path(buf, sizeof(buf), dp,
@@ -753,8 +752,6 @@ print_loadopt_str(uint8_t *data, size_t datalen)
}
dp = (efidp)((char *)dp + efidp_size(dp));
}
- if (optlen == 0)
- return;
}
static char *