Skip to content

Commit

Permalink
Use Werror, Wpedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Dec 30, 2024
1 parent 612dff3 commit af629d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_package(Dyninst 13.0.0 REQUIRED COMPONENTS dyninstAPI dynC_API parseAPI

add_executable(InterestingProgram common/mutatees/InterestingProgram.cpp)

set(EXAMPLES_WARNING_FLAGS -Wall -Wextra)
set(EXAMPLES_WARNING_FLAGS -Wall -Wextra -Wpedantic -Werror)

add_subdirectory(CFGraph)
add_subdirectory(codeCoverage)
Expand Down
4 changes: 1 addition & 3 deletions instructionAPI/statefull_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ struct stateful_visitor : di::Visitor {

void print(di::Instruction const& insn) {
stateful_visitor v;
std::vector<di::Operand> operands;
insn.getOperands(operands);

std::cout << "instruction: " << insn.format() << '\n';
for(auto const& o : operands) {
for(auto const& o : insn.getAllOperands()) {
std::cout << "operand '" << o.format(insn.getArch()) << "'\n";
o.getValue()->apply(&v);
std::cout << v << '\n';
Expand Down
4 changes: 1 addition & 3 deletions instructionAPI/stateless_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ class printer : public di::Visitor {

void print(di::Instruction const& insn) {
printer pv;
std::vector<di::Operand> operands;
insn.getOperands(operands);

std::cout << "instruction: " << insn.format() << '\n';
int op_num = 1;
for(auto const& o : operands) {
for(auto const& o : insn.getAllOperands()) {
std::cout << "operand" << op_num << " '" << o.format(insn.getArch()) << "'\n";
o.getValue()->apply(&pv);
op_num++;
Expand Down

0 comments on commit af629d2

Please sign in to comment.