public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rdsandiford@googlemail.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: binutils <binutils@sourceware.org>,  Nick Clifton <nickc@redhat.com>
Subject: Re: [patch] Convert coff64-rs6000.c to iso-c
Date: Tue, 26 Apr 2011 08:47:00 -0000	[thread overview]
Message-ID: <g4vcy11jsg.fsf@googlemail.com> (raw)
In-Reply-To: <7D113C3D-4663-40D1-97CA-972703D8C55E@adacore.com> (Tristan	Gingold's message of "Fri, 22 Apr 2011 10:02:24 +0200")

Tristan Gingold <gingold@adacore.com> writes:
>  /* Relocation functions */
> -static bfd_boolean xcoff64_reloc_type_br
> -  PARAMS ((XCOFF_RELOC_FUNCTION_ARGS));
> +static bfd_boolean xcoff64_reloc_type_br (XCOFF_RELOC_FUNCTION_ARGS);

BFD style is to have the (...) on the next line, regardless of whether
it fits on the current one:

static bfd_boolean xcoff64_reloc_type_br
  (XCOFF_RELOC_FUNCTION_ARGS);

> @@ -241,14 +238,11 @@ bfd_boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
>  #define coff_bfd_reloc_type_lookup xcoff64_reloc_type_lookup
>  #define coff_bfd_reloc_name_lookup xcoff64_reloc_name_lookup
>  #ifdef AIX_CORE
> -extern const bfd_target * rs6000coff_core_p
> -  PARAMS ((bfd *abfd));
> +extern const bfd_target * rs6000coff_core_p (bfd *abfd);
>  extern bfd_boolean rs6000coff_core_file_matches_executable_p
> -  PARAMS ((bfd *cbfd, bfd *ebfd));
> -extern char *rs6000coff_core_file_failing_command
> -  PARAMS ((bfd *abfd));
> -extern int rs6000coff_core_file_failing_signal
> -  PARAMS ((bfd *abfd));
> +  (bfd *cbfd, bfd *ebfd);
> +extern char *rs6000coff_core_file_failing_command (bfd *abfd);
> +extern int rs6000coff_core_file_failing_signal (bfd *abfd);
>  #define CORE_FILE_P rs6000coff_core_p
>  #define coff_core_file_failing_command \
>    rs6000coff_core_file_failing_command

Same here.

>  {
>    union internal_auxent *in = (union internal_auxent *) inp;
>    union external_auxent *ext = (union external_auxent *) extp;
>  
> -  memset ((PTR) ext, 0, bfd_coff_auxesz (abfd));
> +  memset ((void *) ext, 0, bfd_coff_auxesz (abfd));

Just drop the (PTR) conversion.  (void *) casts aren't necessary
and tend to make things less readable.  We certainly won't be able
to enforce explicit (void *) casts for future changes, so the code
would become inconsistent.

Same throughout.

> @@ -2829,16 +2750,11 @@ const bfd_target rs6000coff64_vec =
>      (void *) &bfd_xcoff_backend_data,
>    };
>  
> -extern const bfd_target *xcoff64_core_p
> -  PARAMS ((bfd *));
> -extern bfd_boolean xcoff64_core_file_matches_executable_p
> -  PARAMS ((bfd *, bfd *));
> -extern char *xcoff64_core_file_failing_command
> -  PARAMS ((bfd *));
> -extern int xcoff64_core_file_failing_signal
> -  PARAMS ((bfd *));
> -#define xcoff64_core_file_pid \
> -  _bfd_nocore_core_file_pid
> +extern const bfd_target *xcoff64_core_p (bfd *);
> +extern bfd_boolean xcoff64_core_file_matches_executable_p (bfd *, bfd *);
> +extern char *xcoff64_core_file_failing_command (bfd *);
> +extern int xcoff64_core_file_failing_signal (bfd *);
> +#define xcoff64_core_file_pid _bfd_nocore_core_file_pid

More cases where the params should stay on their current line.

OK with those changes, thanks.

Richard

  parent reply	other threads:[~2011-04-26  8:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 12:21 [patch] Convert coff-rs6000.c " Tristan Gingold
2011-04-18 13:31 ` Nick Clifton
2011-04-18 14:00   ` Tristan Gingold
2011-04-21 10:22   ` Joseph S. Myers
2011-04-21 10:28     ` Tristan Gingold
2011-04-21 14:08     ` Nick Clifton
2011-04-22  8:02       ` [patch] Convert coff64-rs6000.c " Tristan Gingold
2011-04-22  8:19         ` Andreas Schwab
2011-04-22  8:24           ` Tristan Gingold
2011-04-26  8:47         ` Richard Sandiford [this message]
2011-04-26  9:14           ` Tristan Gingold
2011-04-22  8:10       ` [patch] Convert aix386-core " Tristan Gingold
2011-04-26  8:49         ` Richard Sandiford
2011-04-27  9:44           ` Nick Clifton
2011-04-21 21:22     ` [patch] Convert coff-rs6000.c " Ian Lance Taylor

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=g4vcy11jsg.fsf@googlemail.com \
    --to=rdsandiford@googlemail.com \
    --cc=binutils@sourceware.org \
    --cc=gingold@adacore.com \
    --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).