Skip to content

Commit

Permalink
Avoid unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Jun 11, 2021
1 parent c7c7886 commit aa7f93f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
40 changes: 11 additions & 29 deletions modules/debug/ps2link/cmdHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pkoExecIop(char *buf, int len)
pko_pkt_execiop_req *cmd;
int retval;
int arglen;
char *path;
char *args;
unsigned int argc;
int id;
Expand All @@ -72,7 +71,6 @@ pkoExecIop(char *buf, int len)

printf("IOP cmd: %ld args\n", ntohl(cmd->argc));

path = &cmd->argv[0];
args = &cmd->argv[strlen(cmd->argv) + 1];
argc = ntohl(cmd->argc);

Expand Down Expand Up @@ -161,33 +159,25 @@ pkoSendSifCmd(unsigned int cmd, void *src, unsigned int len)
static void
pkoExecEE(char *buf, int len)
{
int ret;

ret = pkoSendSifCmd(PKO_RPC_EXECEE, buf, len);
pkoSendSifCmd(PKO_RPC_EXECEE, buf, len);
};
//////////////////////////////////////////////////////////////////////////
static void
pkoGSExec(char *buf, int len)
{
int ret;

ret = pkoSendSifCmd(PKO_RPC_GSEXEC, buf, len);
pkoSendSifCmd(PKO_RPC_GSEXEC, buf, len);
};
//////////////////////////////////////////////////////////////////////////
static void
pkoNetDump(char *buf, int len)
{
int ret;

ret = pkoSendSifCmd(PKO_RPC_NETDUMP, buf, len);
pkoSendSifCmd(PKO_RPC_NETDUMP, buf, len);
};
//////////////////////////////////////////////////////////////////////////
static void
pkoScrDump(char *buf, int len)
{
int ret;

ret = pkoSendSifCmd(PKO_RPC_SCRDUMP, buf, len);
pkoSendSifCmd(PKO_RPC_SCRDUMP, buf, len);
};

//////////////////////////////////////////////////////////////////////////
Expand All @@ -201,8 +191,6 @@ pkoPowerOff()
static void
pkoReset(char *buf, int len)
{
int ret;

dbgprintf("IOP cmd: RESET\n");

if (len != sizeof(pko_pkt_reset_req)) {
Expand All @@ -215,43 +203,37 @@ pkoReset(char *buf, int len)
printf("unmounted\n");
DelDrv("tty");

ret = pkoSendSifCmd(PKO_RPC_RESET, buf, len);
pkoSendSifCmd(PKO_RPC_RESET, buf, len);
};

static void
pkoStopVU(char *buf, int len)
{
int ret;

ret = pkoSendSifCmd(PKO_RPC_STOPVU, buf, len);
pkoSendSifCmd(PKO_RPC_STOPVU, buf, len);
};

static void
pkoStartVU(char *buf, int len)
{
int ret;
ret = pkoSendSifCmd(PKO_RPC_STARTVU, buf, len);
pkoSendSifCmd(PKO_RPC_STARTVU, buf, len);
};

static void
pkoDumpMem(char *buf, int len)
{
int ret;
ret = pkoSendSifCmd(PKO_RPC_DUMPMEM, buf, len);
pkoSendSifCmd(PKO_RPC_DUMPMEM, buf, len);
};

static void
pkoDumpReg(char *buf, int len)
{
int ret;
ret = pkoSendSifCmd(PKO_RPC_DUMPREG, buf, len);
pkoSendSifCmd(PKO_RPC_DUMPREG, buf, len);
};

static void
pkoWriteMem(char *buf, int len)
{
int ret;
ret = pkoSendSifCmd(PKO_RPC_WRITEMEM, buf, len);
pkoSendSifCmd(PKO_RPC_WRITEMEM, buf, len);
};

//////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -344,7 +326,7 @@ cmdPowerOff(void *arg)
reset.cmd = htonl(PKO_RESET_CMD);
reset.len = 0;

pkoReset((unsigned char *)&reset, sizeof(reset));
pkoReset((char *)&reset, sizeof(reset));
#endif
}

Expand Down
5 changes: 2 additions & 3 deletions modules/iopcore/cdvdman/cdvdman.c
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,6 @@ static int cdvdman_findfile(cd_file_t *pcdfile, const char *name, int layer)
static int cdvdman_writeSCmd(u8 cmd, void *in, u32 in_size, void *out, u32 out_size)
{
int i;
u8 dummy;
u8 *p;
u8 rdbuf[64];

Expand All @@ -1687,7 +1686,7 @@ static int cdvdman_writeSCmd(u8 cmd, void *in, u32 in_size, void *out, u32 out_s

if (!(CDVDreg_SDATAIN & 0x40)) {
do {
dummy = CDVDreg_SDATAOUT;
(void)CDVDreg_SDATAOUT;
} while (!(CDVDreg_SDATAIN & 0x40));
}

Expand All @@ -1699,7 +1698,7 @@ static int cdvdman_writeSCmd(u8 cmd, void *in, u32 in_size, void *out, u32 out_s
}

CDVDreg_SCOMMAND = cmd;
dummy = CDVDreg_SCOMMAND;
(void)CDVDreg_SCOMMAND;

while (CDVDreg_SDATAIN & 0x80) {
;
Expand Down
5 changes: 2 additions & 3 deletions modules/iopcore/cdvdman/hdpro_atad.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,9 @@ int ata_io_start(void *buf, u32 blkcount, u16 feature, u16 nsector, u16 sector,
suspend_intr();
HDPROreg_IO8 = 0x21;
CDVDreg_STATUS = 0;
unsigned int dummy = HDPROreg_IO8;
(void)HDPROreg_IO8;
CDVDreg_STATUS = 0;
resume_intr();
dummy = 0;

/* Finally! We send off the ATA command with arguments. */
hdpro_io_write(ATAreg_CONTROL_WR, (using_timeout == 0) << 1);
Expand Down Expand Up @@ -712,7 +711,7 @@ int ata_device_sector_io(int device, void *buf, u32 lba, u32 nsectors, int dir)
continue;

nbytes = len * 512;
buf = (void *)((u8 *)buf + len * 512);
buf = (void *)((u8 *)buf + nbytes);
lba += len;
nsectors -= len;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/mcemu/mcemu_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int hookMcman63(int fd, u32 eeaddr, int nbyte)
register int rlen;
register int rval;
register int size;
register u32 id;
register u32 id __attribute__((unused));
register char *rpcbuf, *fiobuf;
SifRpcClientData_t *cldata;

Expand Down

0 comments on commit aa7f93f

Please sign in to comment.