mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-23 13:39:46 +00:00
wasm: silence some compilation warnings
This commit is contained in:
parent
d8fb57bb67
commit
0783e3fa38
@ -3,6 +3,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_arm(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_arm(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_arm64(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_arm64(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_evm(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_evm(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -4,12 +4,14 @@
|
||||
#include <stdio.h>
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_m680x(csh handle, cs_insn *insn);
|
||||
|
||||
static const char *s_access[] = {
|
||||
"UNCHANGED", "READ", "WRITE", "READ | WRITE",
|
||||
};
|
||||
|
||||
|
||||
void print_read_write_regs(csh handle, cs_detail *detail)
|
||||
static void print_read_write_regs(csh handle, cs_detail *detail)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_m68k(csh handle, cs_insn *ins);
|
||||
|
||||
static const char* s_addressing_modes[] = {
|
||||
"<invalid mode>",
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_mips(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_mips(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -3,7 +3,8 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_string_hex(char *comment, unsigned char *str, size_t len);
|
||||
void print_insn_detail_mos65xx(csh handle, cs_insn *ins);
|
||||
|
||||
|
||||
static const char *get_am_name(mos65xx_address_mode mode)
|
||||
{
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_ppc(csh handle, cs_insn *ins);
|
||||
|
||||
|
||||
static const char* get_bc_name(int bc)
|
||||
{
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_sparc(csh handle, cs_insn *ins);
|
||||
|
||||
|
||||
void print_insn_detail_sparc(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_sysz(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_sysz(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_tms320c64x(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_tms320c64x(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_wasm(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_wasm(csh handle, cs_insn *ins)
|
||||
{
|
||||
@ -23,28 +24,28 @@ void print_insn_detail_wasm(csh handle, cs_insn *ins)
|
||||
default:
|
||||
break;
|
||||
case WASM_OP_INT7:
|
||||
printf("\t\tOperand[%d] type: int7\n", i);
|
||||
printf("\t\tOperand[%d] value: %d\n", i, wasm->operands[i].int7);
|
||||
printf("\t\tOperand[%u] type: int7\n", i);
|
||||
printf("\t\tOperand[%u] value: %d\n", i, wasm->operands[i].int7);
|
||||
break;
|
||||
case WASM_OP_UINT32:
|
||||
printf("\t\tOperand[%d] type: uint32\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%x\n", i, wasm->operands[i].uint32);
|
||||
printf("\t\tOperand[%u] type: uint32\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%x\n", i, wasm->operands[i].uint32);
|
||||
break;
|
||||
case WASM_OP_UINT64:
|
||||
printf("\t\tOperand[%d] type: uint64\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%lx\n", i, wasm->operands[i].uint64);
|
||||
printf("\t\tOperand[%u] type: uint64\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%" PRIx64 "\n", i, wasm->operands[i].uint64);
|
||||
break;
|
||||
case WASM_OP_VARUINT32:
|
||||
printf("\t\tOperand[%d] type: varuint32\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%x\n", i, wasm->operands[i].varuint32);
|
||||
printf("\t\tOperand[%u] type: varuint32\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%x\n", i, wasm->operands[i].varuint32);
|
||||
break;
|
||||
case WASM_OP_VARUINT64:
|
||||
printf("\t\tOperand[%d] type: varuint64\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%lx\n", i, wasm->operands[i].varuint64);
|
||||
printf("\t\tOperand[%u] type: varuint64\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%" PRIx64 "\n", i, wasm->operands[i].varuint64);
|
||||
break;
|
||||
}
|
||||
|
||||
printf("\t\tOperand[%d] size: %d\n", i, wasm->operands[i].size);
|
||||
printf("\t\tOperand[%u] size: %u\n", i, wasm->operands[i].size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_x86(csh ud, cs_mode mode, cs_insn *ins);
|
||||
|
||||
void print_string_hex(const char *comment, unsigned char *str, size_t len);
|
||||
|
||||
static const char *get_eflag_name(uint64_t flag)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <capstone/capstone.h>
|
||||
|
||||
void print_insn_detail_xcore(csh handle, cs_insn *ins);
|
||||
|
||||
void print_insn_detail_xcore(csh handle, cs_insn *ins)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ static void print_insn_detail(csh cs_handle, cs_insn *ins)
|
||||
wasm = &(ins->detail->wasm);
|
||||
|
||||
if (wasm->op_count > 0) {
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
printf("\tOperand count: %u\n", wasm->op_count);
|
||||
|
||||
@ -59,27 +59,27 @@ static void print_insn_detail(csh cs_handle, cs_insn *ins)
|
||||
default:
|
||||
break;
|
||||
case WASM_OP_INT7:
|
||||
printf("\t\tOperand[%d] type: int7\n", i);
|
||||
printf("\t\tOperand[%d] value: %d\n", i, wasm->operands[i].int7);
|
||||
printf("\t\tOperand[%u] type: int7\n", i);
|
||||
printf("\t\tOperand[%u] value: %d\n", i, wasm->operands[i].int7);
|
||||
break;
|
||||
case WASM_OP_UINT32:
|
||||
printf("\t\tOperand[%d] type: uint32\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%x\n", i, wasm->operands[i].uint32);
|
||||
printf("\t\tOperand[%u] type: uint32\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%x\n", i, wasm->operands[i].uint32);
|
||||
break;
|
||||
case WASM_OP_UINT64:
|
||||
printf("\t\tOperand[%d] type: uint64\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%lx\n", i, wasm->operands[i].uint64);
|
||||
printf("\t\tOperand[%u] type: uint64\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%" PRIx64 "\n", i, wasm->operands[i].uint64);
|
||||
break;
|
||||
case WASM_OP_VARUINT32:
|
||||
printf("\t\tOperand[%d] type: varuint32\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%x\n", i, wasm->operands[i].varuint32);
|
||||
printf("\t\tOperand[%u] type: varuint32\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%x\n", i, wasm->operands[i].varuint32);
|
||||
break;
|
||||
case WASM_OP_VARUINT64:
|
||||
printf("\t\tOperand[%d] type: varuint64\n", i);
|
||||
printf("\t\tOperand[%d] value: 0x%lx\n", i, wasm->operands[i].varuint64);
|
||||
printf("\t\tOperand[%u] type: varuint64\n", i);
|
||||
printf("\t\tOperand[%u] value: 0x%" PRIx64 "\n", i, wasm->operands[i].varuint64);
|
||||
break;
|
||||
}
|
||||
printf("\t\tOperand[%d] size: %u\n", i, wasm->operands[i].size);
|
||||
printf("\t\tOperand[%u] size: %u\n", i, wasm->operands[i].size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user