Blob Blame Raw
From a8b6f41df623cd777e41e0f6d44e25617f8388c9 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 7 Jul 2015 12:04:28 -0400
Subject: [PATCH 72/74] Add some __unused__ where gcc 5.x is more picky about
 it.

With some build flags, gcc 5.x throws more warnings about __unused__ not
being present than older compilers did.  This patch adds the annotation.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 grub-core/gettext/gettext.c | 10 +++++-----
 grub-core/normal/menu.c     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
index 1e5c21d..b22e1bc 100644
--- a/grub-core/gettext/gettext.c
+++ b/grub-core/gettext/gettext.c
@@ -434,7 +434,7 @@ static char *
 grub_gettext_env_write_lang (struct grub_env_var *var
 			     __attribute__ ((unused)), const char *val)
 {
-  grub_err_t err;
+  grub_err_t __attribute__((__unused__)) err;
   err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
 			       grub_env_get ("prefix"));
 
@@ -447,7 +447,7 @@ grub_gettext_env_write_lang (struct grub_env_var *var
 void
 grub_gettext_reread_prefix (const char *val)
 {
-  grub_err_t err;
+  grub_err_t __attribute__((__unused__)) err;
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), 
 			       grub_env_get ("locale_dir"),
 			       val);
@@ -457,7 +457,7 @@ static char *
 read_main (struct grub_env_var *var
 	   __attribute__ ((unused)), const char *val)
 {
-  grub_err_t err;
+  grub_err_t __attribute__((__unused__)) err;
   err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
 			       grub_env_get ("prefix"));
   return grub_strdup (val);
@@ -467,7 +467,7 @@ static char *
 read_secondary (struct grub_env_var *var
 		__attribute__ ((unused)), const char *val)
 {
-  grub_err_t err;
+  grub_err_t __attribute__((__unused__)) err;
   err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
 			       0);
   return grub_strdup (val);
@@ -489,7 +489,7 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
 GRUB_MOD_INIT (gettext)
 {
   const char *lang;
-  grub_err_t err;
+  grub_err_t __attribute__((__unused__)) err;
 
   lang = grub_env_get ("lang");
 
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
index 5b971b3..e74cb56 100644
--- a/grub-core/normal/menu.c
+++ b/grub-core/normal/menu.c
@@ -829,7 +829,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
 
 /* Callback invoked immediately before a menu entry is executed.  */
 static void
-notify_booting (grub_menu_entry_t entry,
+notify_booting (grub_menu_entry_t __attribute__((unused)) entry,
 		void *userdata __attribute__((unused)))
 {
 #if 0
-- 
2.4.3