public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: wangnan0@huawei.com (Wang Nan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: kprobes: Fix compilation error caused by superfluous '*'
Date: Tue, 10 Feb 2015 16:13:17 +0800	[thread overview]
Message-ID: <54D9BD9D.2030503@huawei.com> (raw)
In-Reply-To: <1423553267.2647.7.camel@linaro.org>

On 2015/2/10 15:27, Jon Medhurst (Tixy) wrote:
> There is a superfluous '*' in the definition of kprobe_decode_insn_t
> which on older versions of GCC (4.2.4) causes the compilation error:
> 
> In file included from arch/arm/probes/kprobes/core.c:37:
> arch/arm/probes/kprobes/core.h:43: error: '[*]' not allowed in other than a declaration
> 
> Fix this by removing the unneeded character.
> 

Hi Tixy,

I checked C spec when writing this code and found [*] should be a standard way to
represent array of unspecified number elements. But I forgot there are old gccs
which don't support it.

Thank you for your fix!

> Reported-by: Janusz U?ycki <j.uzycki@elproma.com.pl>
> Signed-off-by: Jon Medhurst <tixy@linaro.org>
> ---
> 
> Russell, I also applied this to my branch that you pulled which
> introduced the bug...
> git://git.linaro.org/people/tixy/kernel.git kprobes
> 
>  arch/arm/probes/kprobes/core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/probes/kprobes/core.h b/arch/arm/probes/kprobes/core.h
> index b3036c5..ec5d1f2 100644
> --- a/arch/arm/probes/kprobes/core.h
> +++ b/arch/arm/probes/kprobes/core.h
> @@ -40,7 +40,7 @@ typedef enum probes_insn (kprobe_decode_insn_t)(probes_opcode_t,
>  						struct arch_probes_insn *,
>  						bool,
>  						const union decode_action *,
> -						const struct decode_checker *[*]);
> +						const struct decode_checker *[]);
>  
>  #ifdef CONFIG_THUMB2_KERNEL
>  
> 

      reply	other threads:[~2015-02-10  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10  7:27 [PATCH] ARM: kprobes: Fix compilation error caused by superfluous '*' Jon Medhurst (Tixy)
2015-02-10  8:13 ` Wang Nan [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=54D9BD9D.2030503@huawei.com \
    --to=wangnan0@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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