grub2/0018-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch
Peter Jones d9747d852b Reorder some patches to prep things for pushing upstream better.
Signed-off-by: Peter Jones <pjones@redhat.com>
2016-03-04 14:25:32 -05:00

80 lines
2.7 KiB
Diff

From e406ca2c569d1910eedf58c5647d3a524a09a60e Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 7 Jul 2015 12:04:28 -0400
Subject: [PATCH 18/84] 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 4fecc28..73a94aa 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)))
{
grub_printf (" ");
--
2.5.0