Skip to content

Commit

Permalink
Add Werror to compile options. (capstone-engine#2114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 authored Jul 23, 2023
1 parent 9b7935b commit 897e1f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ project(capstone
if (MSVC)
add_compile_options(/W1 /w14189)
else()
add_compile_options(-Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
add_compile_options(-Werror -Wformat -Wmissing-braces -Wunused-function -Warray-bounds -Wunused-variable -Wparentheses -Wint-in-bool-context)
endif()


Expand Down
6 changes: 3 additions & 3 deletions suite/arm/test_arm_regression.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void snprint_insn_detail(char * buf, size_t * cur, size_t * left, cs_insn
_this_printf("\t\toperands[%u].type: REG = %s\n", i, cs_reg_name(handle, op->reg));
break;
case ARM_OP_IMM:
_this_printf("\t\toperands[%u].type: IMM = 0x%x\n", i, op->imm);
_this_printf("\t\toperands[%u].type: IMM = 0x%" PRIx64 "\n", i, op->imm);
break;
case ARM_OP_FP:
_this_printf("\t\toperands[%u].type: FP = %f\n", i, op->fp);
Expand All @@ -95,10 +95,10 @@ static void snprint_insn_detail(char * buf, size_t * cur, size_t * left, cs_insn

break;
case ARM_OP_PIMM:
_this_printf("\t\toperands[%u].type: P-IMM = %u\n", i, op->imm);
_this_printf("\t\toperands[%u].type: P-IMM = %" PRIu64 "\n", i, op->imm);
break;
case ARM_OP_CIMM:
_this_printf("\t\toperands[%u].type: C-IMM = %u\n", i, op->imm);
_this_printf("\t\toperands[%u].type: C-IMM = %" PRIu64 "\n", i, op->imm);
break;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void print_insn_detail(csh handle, cs_insn *insn)
break;

case SH_OP_IMM:
printf("\t\toperands[%u].type: IMMEDIATE = #%llu\n", i,
printf("\t\toperands[%u].type: IMMEDIATE = #%" PRIu64 "\n", i,
op->imm);
break;

Expand Down

0 comments on commit 897e1f2

Please sign in to comment.