public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: Commit: Fix whitespace snafu in tc-riscv.c
Date: Tue, 12 Dec 2023 18:34:25 +0800	[thread overview]
Message-ID: <CAPpQWtBt_fw521XJn3ZyV31wnN0wWmJqfZ8Zyqq-ZU9KBpiwZQ@mail.gmail.com> (raw)
In-Reply-To: <87edfroi0w.fsf@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]

Thanks, I didn't notice the indentation of the code here :-(

Nelson

On Tue, Dec 12, 2023 at 6:03 PM Nick Clifton <nickc@redhat.com> wrote:

> Hi Guys
>
>   I am applying the patch below in order to fix this compile time
>   warning/error message:
>
>     gas/config/tc-riscv.c: In function 'md_apply_fix':
>     gas/config/tc-riscv.c:4364:11: error: this 'if' clause does not
> guard... [-Werror=misleading-indentation]
>     4364 |           if (!riscv_record_pcrel_fixup
> (riscv_pcrel_hi_fixup_hash,
>          |           ^~
>     gas/config/tc-riscv.c:4370:13: note: ...this statement, but the latter
> is misleadingly indented as if it were guarded by the 'if'
>     4370 |             bfd_putl32 (bfd_getl32 (buf)
>          |             ^~~~~~~~~~
>
> Cheers
>   Nick
>
> diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
> index a46a6a4ec48..b902c6ba2c1 100644
> --- a/gas/config/tc-riscv.c
> +++ b/gas/config/tc-riscv.c
> @@ -4367,11 +4367,11 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg
> ATTRIBUTE_UNUSED)
>                                          target))
>             as_warn (_("too many pcrel_hi"));
>
> -           bfd_putl32 (bfd_getl32 (buf)
> -                       | ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)),
> -                       buf);
> -           if (!riscv_opts.relax)
> -             fixP->fx_done = 1;
> +         bfd_putl32 (bfd_getl32 (buf)
> +                     | ENCODE_UTYPE_IMM (RISCV_CONST_HIGH_PART (value)),
> +                     buf);
> +         if (!riscv_opts.relax)
> +           fixP->fx_done = 1;
>         }
>        relaxable = true;
>        break;
>
>

      reply	other threads:[~2023-12-12 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 10:02 Nick Clifton
2023-12-12 10:34 ` Nelson Chu [this message]

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=CAPpQWtBt_fw521XJn3ZyV31wnN0wWmJqfZ8Zyqq-ZU9KBpiwZQ@mail.gmail.com \
    --to=nelson@rivosinc.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).