ARM: kprobes: Fix compilation error caused by superfluous '*'
PATCH 1/1 ARM: kprobes: Fix compilation error caused by superfluous '*'
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.
---
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(-)
arch/arm/probes/kprobes/core.h +1 -1
@@ -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
Signature · 1 line
2.1.4
PATCH 1/1 ARM: kprobes: Fix compilation error caused by superfluous '*'
Quoted 8 lines · Jon Medhurst (Tixy)
There is a superfluous '*' in the definition of
kprobe_decode_insn_twhich 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 declarationFix 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!
Quoted 25 lines
Reported-by Janusz U?ycki <[email protected]>Signed-off-by Jon Medhurst <[email protected]>---
Russell, I also applied this to my branch that you pulled which introduced the bug...
git://git.linaro.org/people/tixy/kernel.gitkprobesarch/arm/probes/kprobes/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/probes/kprobes/core.h +1
-1@@ -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