2016-03-04 19:24:31 +00:00
|
|
|
From e406ca2c569d1910eedf58c5647d3a524a09a60e Mon Sep 17 00:00:00 2001
|
2015-07-22 13:44:51 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Tue, 7 Jul 2015 12:04:28 -0400
|
2016-03-04 19:24:31 +00:00
|
|
|
Subject: [PATCH 18/84] Add some __unused__ where gcc 5.x is more picky about
|
2015-07-22 13:44:51 +00:00
|
|
|
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
|
2016-03-04 19:24:31 +00:00
|
|
|
index 4880cef..1b1986f 100644
|
2015-07-22 13:44:51 +00:00
|
|
|
--- 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"));
|
2016-03-04 19:24:31 +00:00
|
|
|
if (err)
|
|
|
|
@@ -451,7 +451,7 @@ grub_gettext_env_write_lang (struct grub_env_var *var
|
2015-07-22 13:44:51 +00:00
|
|
|
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);
|
2016-03-04 19:24:31 +00:00
|
|
|
@@ -463,7 +463,7 @@ static char *
|
2015-07-22 13:44:51 +00:00
|
|
|
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"));
|
2016-03-04 19:24:31 +00:00
|
|
|
if (err)
|
|
|
|
@@ -475,7 +475,7 @@ static char *
|
2015-07-22 13:44:51 +00:00
|
|
|
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);
|
2016-03-04 19:24:31 +00:00
|
|
|
if (err)
|
|
|
|
@@ -500,7 +500,7 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
|
2015-07-22 13:44:51 +00:00
|
|
|
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
|
2016-03-04 19:24:31 +00:00
|
|
|
index 4fecc28..73a94aa 100644
|
2015-07-22 13:44:51 +00:00
|
|
|
--- 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)))
|
|
|
|
{
|
2016-03-04 19:24:31 +00:00
|
|
|
grub_printf (" ");
|
2015-07-22 13:44:51 +00:00
|
|
|
--
|
2016-03-04 18:32:29 +00:00
|
|
|
2.5.0
|
2015-07-22 13:44:51 +00:00
|
|
|
|