Skip to content

Commit

Permalink
variable 'varname' is assigned a value that is never used
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Aug 17, 2021
1 parent 3b2f83f commit 9ebbc37
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 49 deletions.
30 changes: 15 additions & 15 deletions labs/genvmclab/genvmclab.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void set_ipconfig(void)
//--------------------------------------------------------------
int main(int argc, char *argv[2])
{
int ret, id;
int ret;

init_scr();
scr_clear();
Expand Down Expand Up @@ -130,59 +130,59 @@ int main(int argc, char *argv[2])
// HomeBrew mcman required by genvmc for VMCcopy function to work (on my V3, mcman
// from ROM is buggy and we can't read MC pages directly)
DPRINTF("loading mcman... ");
id = SifExecModuleBuffer(&mcman_irx, size_mcman_irx, 0, NULL, &ret);
SifExecModuleBuffer(&mcman_irx, size_mcman_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading iomanX... ");
id = SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading fileXio... ");
id = SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading poweroff... "); // modules for debugging
id = SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ps2dev9... ");
id = SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smsutils... ");
id = SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smstcpip... ");
id = SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smsmap... ");
id = SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading udptty... ");
id = SifExecModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL, &ret);
SifExecModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ioptrap... ");
id = SifExecModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ps2link... ");
id = SifExecModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading genvmc... "); // the module in testing
id = SifExecModuleBuffer(&genvmc_irx, size_genvmc_irx, 0, NULL, &ret);
SifExecModuleBuffer(&genvmc_irx, size_genvmc_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading usbd... "); // usb drivers needed to create file on it
id = SifExecModuleBuffer(&usbd_irx, size_usbd_irx, 0, NULL, &ret);
SifExecModuleBuffer(&usbd_irx, size_usbd_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading usbhdfsd... ");
id = SifExecModuleBuffer(&usbhdfsd_irx, size_usbhdfsd_irx, 0, NULL, &ret);
SifExecModuleBuffer(&usbhdfsd_irx, size_usbhdfsd_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

delay(3); // some delay is required by usb mass storage driver
Expand Down
24 changes: 12 additions & 12 deletions labs/lwnbdsvr/lwnbdsvrlab.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void set_ipconfig(void)
//--------------------------------------------------------------
int main(int argc, char *argv[2])
{
int ret, id;
int ret;

init_scr();
scr_clear();
Expand Down Expand Up @@ -112,17 +112,17 @@ int main(int argc, char *argv[2])

scr_printf("\t loading modules... ");

id = SifExecModuleBuffer(&discid_irx, size_discid_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
id = SifExecModuleBuffer(&ps2atad_irx, size_ps2atad_irx, 0, NULL, &ret);
id = SifExecModuleBuffer(&ps2hdd_irx, size_ps2hdd_irx, sizeof(hddarg), hddarg, &ret);
id = SifExecModuleBuffer(&lwnbdsvr_irx, size_lwnbdsvr_irx, 0, NULL, &ret);
SifExecModuleBuffer(&discid_irx, size_discid_irx, 0, NULL, &ret);
SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
SifExecModuleBuffer(&ps2atad_irx, size_ps2atad_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2hdd_irx, size_ps2hdd_irx, sizeof(hddarg), hddarg, &ret);
SifExecModuleBuffer(&lwnbdsvr_irx, size_lwnbdsvr_irx, 0, NULL, &ret);

scr_printf("OK\n");

Expand Down
24 changes: 12 additions & 12 deletions labs/smblab/smblab.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void set_ipconfig(void)
//--------------------------------------------------------------
int main(int argc, char *argv[2])
{
int i, ret, id;
int i, ret;

init_scr();
scr_clear();
Expand Down Expand Up @@ -167,47 +167,47 @@ int main(int argc, char *argv[2])
set_ipconfig();

DPRINTF("loading iomanX... ");
id = SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
SifExecModuleBuffer(&iomanx_irx, size_iomanx_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading fileXio... ");
id = SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
SifExecModuleBuffer(&filexio_irx, size_filexio_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading poweroff... ");
id = SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
SifExecModuleBuffer(&poweroff_irx, size_poweroff_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ps2dev9... ");
id = SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2dev9_irx, size_ps2dev9_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smsutils... ");
id = SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smsutils_irx, size_smsutils_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smstcpip... ");
id = SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smstcpip_irx, size_smstcpip_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smsmap... ");
id = SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
SifExecModuleBuffer(&smsmap_irx, size_smsmap_irx, g_ipconfig_len, g_ipconfig, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading udptty... ");
id = SifExecModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL, &ret);
SifExecModuleBuffer(&udptty_irx, size_udptty_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ioptrap... ");
id = SifExecModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ioptrap_irx, size_ioptrap_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading ps2link... ");
id = SifExecModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL, &ret);
SifExecModuleBuffer(&ps2link_irx, size_ps2link_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("loading smbman... ");
id = SifExecModuleBuffer(&smbman_irx, size_smbman_irx, 0, NULL, &ret);
SifExecModuleBuffer(&smbman_irx, size_smbman_irx, 0, NULL, &ret);
DPRINTF("ret=%d\n", ret);

DPRINTF("modules load OK\n");
Expand Down
5 changes: 0 additions & 5 deletions modules/debug/ps2link/net_fio.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ int pko_write_file(int fd, char *buf, int length)
//
int pko_read_file(int fd, char *buf, int length)
{
int readbytes;
int nbytes;
int i;
pko_pkt_read_req *readcmd;
Expand All @@ -375,14 +374,11 @@ int pko_read_file(int fd, char *buf, int length)

readcmd = (pko_pkt_read_req *)&send_packet[0];
readrly = (pko_pkt_read_rly *)&recv_packet[0];
readbytes = 0;

readcmd->cmd = htonl(PKO_READ_CMD);
readcmd->len = htons((unsigned short)sizeof(pko_pkt_read_req));
readcmd->fd = htonl(fd);

readbytes = 0;

if (length < 0) {
dbgprintf("pko_read_file: illegal req!! (whish to read < 0 bytes!)\n");
return -1;
Expand Down Expand Up @@ -415,7 +411,6 @@ int pko_read_file(int fd, char *buf, int length)
return -1;
}
return nbytes;
return readbytes;
}

//----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion modules/iopcore/cdvdman/hdpro_atad.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static int ata_device_select(int device)

/* Select the device. */
hdpro_io_write(ATAreg_SELECT_WR, (device & 1) << 4);
res = hdpro_io_read(ATAreg_CONTROL_RD);
hdpro_io_read(ATAreg_CONTROL_RD);

return ata_wait_bus_busy();
}
Expand Down
2 changes: 0 additions & 2 deletions modules/isofs/isofs.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ static void cdvdman_trimspaces(char *str)
if (len == 0)
return;

i = len - 1;

for (i = len - 1; i != -1; i--) {
p = &str[i];
if ((*p != 0x20) && (*p != 0x2e))
Expand Down
1 change: 0 additions & 1 deletion modules/network/SMSTCPIP/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ tcp_seg_copy(struct tcp_seg *seg)
static err_t
tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
{
arg = arg;
if (p != NULL) {
pbuf_free(p);
} else if (err == ERR_OK) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ void guiDrawSubMenuHints(void)

x = guiDrawIconAndText(gSelectButton == KEY_CIRCLE ? subMenuIcons[0] : subMenuIcons[1], subMenuHints[0], gTheme->fonts[0], x, y, gTheme->textColor);
x += 12;
x = guiDrawIconAndText(gSelectButton == KEY_CIRCLE ? subMenuIcons[1] : subMenuIcons[0], subMenuHints[1], gTheme->fonts[0], x, y, gTheme->textColor);
guiDrawIconAndText(gSelectButton == KEY_CIRCLE ? subMenuIcons[1] : subMenuIcons[0], subMenuHints[1], gTheme->fonts[0], x, y, gTheme->textColor);
}

static int endIntro = 0; // Break intro loop and start 'Last Played Auto Start' countdown
Expand Down

0 comments on commit 9ebbc37

Please sign in to comment.