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'
--- util/getroot.c	2012-02-29 13:14:08 +0000
+++ util/getroot.c	2012-03-01 17:15:32 +0000
@@ -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] == '/')

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to