Skip to contentSkip to conversation

osdep/hurd/getroot: Remove unused variables in grub_util_find_hurd_root_device()

PATCH In review John Paul Adrian Glaubitz 3 participants 3 messages Feb 22, 2023 – Feb 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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)

---
v2:
- Add missing Fixes tag

---
 grub-core/osdep/hurd/getroot.c | 2 --
 1 file changed, 2 deletions(-)
grub-core/osdep/hurd/getroot.c +0 -2
index af31f2c47..0efefdab4 100644
@@ -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] == '@')
         {
Signature · 1 line
2.39.1
Reviewed-by on v2 1/1
#1 lore raw

John Paul Adrian Glaubitz, le mer. 22 févr. 2023 09:43:02 +0100, a ecrit:

Quoted 11 lines

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;
      |              ^~~~
Quoted 3 lines
Fixes e981b0a24 (osdep/hurd/getroot: Use "part:" qualifier)

Thanks!

Quoted 23 lines

---
v2:
- Add missing Fixes tag

---
 grub-core/osdep/hurd/getroot.c | 2 --
 1 file changed, 2 deletions(-)
grub-core/osdep/hurd/getroot.c +0 -2
index af31f2c47..0efefdab4 100644
@@ -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] == '@')
         {
Signature · 1 line
2.39.1
Reviewed-by
#2 lore raw
Quoted 12 lines · Samuel Thibault

John Paul Adrian Glaubitz, le mer. 22 févr. 2023 09:43:02 +0100, a ecrit:

Quoted 11 lines

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;
      |              ^~~~
Quoted 5 lines
Quoted 3 lines
Fixes e981b0a24 (osdep/hurd/getroot: Use "part:" qualifier)

Daniel