Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Warning C4098: void returns value. #2362

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,10 @@ void printOperandAddr(MCInst *MI, uint64_t Address, unsigned OpNum, SStream *O)
{
MCOperand *Op = MCInst_getOperand(MI, (OpNum));
if (!MCOperand_isImm(Op) || MI->csh->PrintBranchImmNotAsAddress ||
getUseMarkup())
return printOperand(MI, OpNum, O);
getUseMarkup()) {
printOperand(MI, OpNum, O);
return;
}
int64_t Imm = MCOperand_getImm(Op);
// For ARM instructions the PC offset is 8 bytes, for Thumb instructions it
// is 4 bytes.
Expand Down Expand Up @@ -1631,8 +1633,10 @@ void printModImmOperand(MCInst *MI, unsigned OpNum, SStream *O)
MCOperand *Op = MCInst_getOperand(MI, (OpNum));

// Support for fixups (MCFixup)
if (MCOperand_isExpr(Op))
return printOperand(MI, OpNum, O);
if (MCOperand_isExpr(Op)) {
printOperand(MI, OpNum, O);
return;
}

unsigned Bits = MCOperand_getImm(Op) & 0xFF;
unsigned Rot = (MCOperand_getImm(Op) & 0xF00) >> 7;
Expand Down
2 changes: 1 addition & 1 deletion arch/Alpha/AlphaMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const char *Alpha_getRegisterName(csh handle, unsigned int id)

void Alpha_printInst(MCInst *MI, SStream *O, void *Info)
{
return Alpha_LLVM_printInstruction(MI, O, Info);
Alpha_LLVM_printInstruction(MI, O, Info);
}

void Alpha_set_instr_map_data(MCInst *MI)
Expand Down
12 changes: 8 additions & 4 deletions arch/PowerPC/PPCInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,10 @@ void printU16ImmOperand(MCInst *MI, unsigned OpNo, SStream *O)
void printBranchOperand(MCInst *MI, uint64_t Address, unsigned OpNo, SStream *O)
{
add_cs_detail(MI, PPC_OP_GROUP_BranchOperand, OpNo);
if (!MCOperand_isImm(MCInst_getOperand(MI, (OpNo))))
return printOperand(MI, OpNo, O);
if (!MCOperand_isImm(MCInst_getOperand(MI, (OpNo)))) {
printOperand(MI, OpNo, O);
return;
}
int32_t Imm = SignExtend32(
((unsigned)MCOperand_getImm(MCInst_getOperand(MI, (OpNo)))
<< 2),
Expand Down Expand Up @@ -534,8 +536,10 @@ void printBranchOperand(MCInst *MI, uint64_t Address, unsigned OpNo, SStream *O)
void printAbsBranchOperand(MCInst *MI, unsigned OpNo, SStream *O)
{
add_cs_detail(MI, PPC_OP_GROUP_AbsBranchOperand, OpNo);
if (!MCOperand_isImm(MCInst_getOperand(MI, (OpNo))))
return printOperand(MI, OpNo, O);
if (!MCOperand_isImm(MCInst_getOperand(MI, (OpNo)))) {
printOperand(MI, OpNo, O);
return;
}

printInt32(O, SignExtend32(((unsigned)MCOperand_getImm(
MCInst_getOperand(MI, (OpNo)))
Expand Down
Loading