To verify instruction/offset in perf, before adding a uprobe we need to use arc/x86/lib/insn.c from perf code. Since perf Makefile enables -Wswitch-default flag it causes build warnings/failures. This patch is to address the build warnings in insn.c. Signed-off-by: Prashanth Nageshappa <prashanth@xxxxxxxxxxxxxxxxxx> --- arch/x86/lib/insn.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/lib/insn.c b/arch/x86/lib/insn.c index 25feb1a..b9e42f1 100644 --- a/arch/x86/lib/insn.c +++ b/arch/x86/lib/insn.c @@ -397,6 +397,8 @@ static void __get_moffset(struct insn *insn) insn->moffset2.value = get_next(int, insn); insn->moffset2.nbytes = 4; break; + default: + break; } insn->moffset1.got = insn->moffset2.got = 1; @@ -417,6 +419,8 @@ static void __get_immv32(struct insn *insn) insn->immediate.value = get_next(int, insn); insn->immediate.nbytes = 4; break; + default: + break; } err_out: @@ -441,6 +445,8 @@ static void __get_immv(struct insn *insn) insn->immediate2.value = get_next(int, insn); insn->immediate2.nbytes = 4; break; + default: + break; } insn->immediate1.got = insn->immediate2.got = 1; @@ -463,6 +469,8 @@ static void __get_immptr(struct insn *insn) case 8: /* ptr16:64 is not exist (no segment) */ return; + default: + break; } insn->immediate2.value = get_next(unsigned short, insn); insn->immediate2.nbytes = 2; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>