Skip to contentSkip to conversation

Fix unused label/function warnings on NetBSD

PATCH In review Grégoire Sutre 2 participants 3 messages Mar 1, 2012 – Mar 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix unused label/function warnings on NetBSD

The attached patch fixes the following warnings when building GRUB on NetBSD (and probably other BSDs):

util/getroot.c: In function 'grub_make_system_path_relative_to_its_root':
util/getroot.c:2711:2: error: label 'parsedir' defined but not used util/getroot.c: At top level:
util/getroot.c:1084:1: error: 'get_dm_uuid' defined but not used util/getroot.c:1119:1: error: 'grub_util_get_dm_abstraction' defined but not used

Grégoire

=== modified file 'util/getroot.c'

getroot.c +4 -0
@@ -1080,6 +1080,7 @@ grub_util_open_dm (const char *os_dev, s
 
 #endif
 
+#ifdef __linux__
 static char *
 get_dm_uuid (const char *os_dev)
 {
@@ -1145,6 +1146,7 @@ grub_util_get_dm_abstraction (const char
   return GRUB_DEV_ABSTRACTION_LVM;  
 #endif
 }
+#endif
 
 #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
 #include <libgeom.h>
@@ -2708,7 +2710,9 @@ grub_make_system_path_relative_to_its_ro
     }
 #endif
 
+#ifdef __linux__
  parsedir:
+#endif
   /* Remove trailing slashes, return empty string if root directory.  */
   len = strlen (buf3);
   while (len > 0 && buf3[len - 1] == '/')
#1 lore raw
Quoted 9 lines · Grégoire Sutre

The attached patch fixes the following warnings when building GRUB on NetBSD (and probably other BSDs):

util/getroot.c: In function 'grub_make_system_path_relative_to_its_root':
util/getroot.c:2711:2: error: label 'parsedir' defined but not used util/getroot.c: At top level:
util/getroot.c:1084:1: error: 'get_dm_uuid' defined but not used util/getroot.c:1119:1: error: 'grub_util_get_dm_abstraction' defined but not used

Is it all fixed after cygwin FTBFS patch series?

Quoted 7 lines

Grégoire

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw
Quoted 4 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 3 lines · Grégoire Sutre

The attached patch fixes the following warnings when building GRUB on NetBSD (and probably other BSDs):

Quoted 8 lines
Quoted 7 lines

util/getroot.c: In function 'grub_make_system_path_relative_to_its_root':
util/getroot.c:2711:2: error: label 'parsedir' defined but not used util/getroot.c: At top level:
util/getroot.c:1084:1: error: 'get_dm_uuid' defined but not used util/getroot.c:1119:1: error: 'grub_util_get_dm_abstraction' defined but not used

Is it all fixed after cygwin FTBFS patch series?

Yes. Thanks,

Grégoire