From: John Paul Adrian Glaubitz Date: Wed, 22 Feb 2023 08:43:02 +0000 (+0100) Subject: osdep/hurd/getroot: Remove unused variables in grub_util_find_hurd_root_device() X-Git-Tag: grub-2.12-rc1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02478007f38424f8434dd130c57df0b3a998346c;p=thirdparty%2Fgrub.git osdep/hurd/getroot: Remove unused variables in grub_util_find_hurd_root_device() Found during a test build on Debian/hurd-i386 with --disable-werror enabled: In file included from grub-core/osdep/getroot.c:12: grub-core/osdep/hurd/getroot.c: In function ‘grub_util_find_hurd_root_device’: grub-core/osdep/hurd/getroot.c:126:13: error: unused variable ‘next’ [-Werror=unused-variable] 126 | char *next; | ^~~~ grub-core/osdep/hurd/getroot.c:125:14: error: unused variable ‘size’ [-Werror=unused-variable] 125 | size_t size; | ^~~~ Fixes: e981b0a24 (osdep/hurd/getroot: Use "part:" qualifier) Signed-off-by: John Paul Adrian Glaubitz Reviewed-by: Samuel Thibault Reviewed-by: Daniel Kiper --- diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c index af31f2c47..0efefdab4 100644 --- a/grub-core/osdep/hurd/getroot.c +++ b/grub-core/osdep/hurd/getroot.c @@ -122,8 +122,6 @@ grub_util_find_hurd_root_device (const char *path) if (strncmp (name, "device:", sizeof ("device:") - 1) == 0) { char *dev_name = name + sizeof ("device:") - 1; - size_t size; - char *next; if (dev_name[0] == '@') {