From 96289d09614ec866b95bbf2fd49e4269bb5be9b3 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Sun, 24 Dec 2017 16:39:57 +0000 Subject: 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. --- usr.sbin/efibootmgr/efibootmgr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'usr.sbin/efibootmgr') 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 * -- cgit v1.2.3