From d12e7f67ee6f1615de71ab8a7b0d4fd1f75d2225 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 6 Nov 2017 01:07:53 +0100 Subject: [PATCH] gcc warning fixes --- src/cs_gen.cc | 1 + src/cs_vm.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cs_gen.cc b/src/cs_gen.cc index 5e2736d6..2e017e2c 100644 --- a/src/cs_gen.cc +++ b/src/cs_gen.cc @@ -1267,6 +1267,7 @@ static void compilestatements(cs_gen_state &gs, int rettype, int brak, int preva if (gs.current(2) != '/') { break; } + [[fallthrough]]; case ';': case ' ': case '\t': diff --git a/src/cs_vm.cc b/src/cs_vm.cc index 21bb0b84..c684b4c1 100644 --- a/src/cs_vm.cc +++ b/src/cs_vm.cc @@ -500,7 +500,7 @@ static inline void cs_call_alias( static_cast(cs.p_state->identmap[i]) ); } - int argmask = aliaslink.usedargs & (~0 << callargs); + int argmask = aliaslink.usedargs & int(~0U << callargs); for (; argmask; ++callargs) { if (argmask & (1 << callargs)) { cs_aliasInternal::pop_arg(static_cast(