All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Fix unused label/function warnings on NetBSD
Date: Thu, 01 Mar 2012 17:25:40 +0100	[thread overview]
Message-ID: <4F4FA304.3050903@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

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

[-- Attachment #2: patch-unused-label-function.diff --]
[-- Type: text/x-patch, Size: 732 bytes --]

=== 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] == '/')


             reply	other threads:[~2012-03-01 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 16:25 Grégoire Sutre [this message]
2012-03-02 10:39 ` [PATCH] Fix unused label/function warnings on NetBSD Vladimir 'φ-coder/phcoder' Serbinenko
2012-03-02 13:08   ` Grégoire Sutre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F4FA304.3050903@gmail.com \
    --to=gregoire.sutre@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.