81 lines
2.7 KiB
Diff
81 lines
2.7 KiB
Diff
From ecaecc9bc12a86a64bffeb64879c621da10d5136 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Tue, 7 Jul 2015 12:04:28 -0400
|
|
Subject: [PATCH 15/85] 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 4880cef..1b1986f 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"));
|
|
if (err)
|
|
@@ -451,7 +451,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);
|
|
@@ -463,7 +463,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"));
|
|
if (err)
|
|
@@ -475,7 +475,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);
|
|
if (err)
|
|
@@ -500,7 +500,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 719e2fb..cd15f04 100644
|
|
--- a/grub-core/normal/menu.c
|
|
+++ b/grub-core/normal/menu.c
|
|
@@ -807,7 +807,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)))
|
|
{
|
|
grub_printf (" ");
|
|
--
|
|
2.5.0
|
|
|