All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] drivers/bios_emulator/x86emu/ops2.c: Fix GCC 4.6 build warning
Date: Thu, 24 Nov 2011 18:14:34 +0100	[thread overview]
Message-ID: <201111241814.34611.marek.vasut@gmail.com> (raw)
In-Reply-To: <1322065864-5424-1-git-send-email-galak@kernel.crashing.org>

> Fix:
> 
> x86emu/ops2.c: In function 'x86emuOp2_set_byte':
> x86emu/ops2.c:171:11: warning: variable 'name' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  drivers/bios_emulator/x86emu/ops2.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/bios_emulator/x86emu/ops2.c
> b/drivers/bios_emulator/x86emu/ops2.c index 937bf4c..59dbb42 100644
> --- a/drivers/bios_emulator/x86emu/ops2.c
> +++ b/drivers/bios_emulator/x86emu/ops2.c
> @@ -42,6 +42,7 @@
>  **************************************************************************
> **/
> 
>  #include <common.h>
> +#include <linux/compiler.h>
>  #include "x86emu/x86emui.h"
> 
>  /*----------------------------- Implementation
> ----------------------------*/ @@ -168,7 +169,7 @@ void
> x86emuOp2_set_byte(u8 op2)
>      int mod, rl, rh;
>      uint destoffset;
>      u8	*destreg;
> -    char *name = 0;
> +    __maybe_unused char *name = 0;

I don't like this __maybe_unused stuff, it seems like you're hiding possible 
errors.

>      int cond = 0;
> 
>      START_OF_INSTR();

  reply	other threads:[~2011-11-24 17:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 16:31 [U-Boot] [PATCH] drivers/bios_emulator/x86emu/ops2.c: Fix GCC 4.6 build warning Kumar Gala
2011-11-24 17:14 ` Marek Vasut [this message]
2011-11-24 19:11   ` Kumar Gala
2011-11-24 20:48   ` Wolfgang Denk
2011-11-24 22:31     ` Marek Vasut
2011-11-27 14:45 ` Wolfgang Denk

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=201111241814.34611.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.