Skip to content

Commit 79af2fd

Browse files
committed
testsuite: discard unused variables, assignments, and parameters in afpclient
1 parent 45c9443 commit 79af2fd

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

test/testsuite/afpclient.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,9 @@ unsigned int AFPChangePW(CONN *conn, char *uam, char *usr, char *opwd,
640640
unsigned int AFPLogOut(CONN *conn)
641641
{
642642
DSI *dsi;
643-
int ret;
644643
dsi = &conn->dsi;
645644
SendCmd(dsi, AFP_LOGOUT);
646-
ret = my_dsi_full_receive(dsi, dsi->commands, DSI_CMDSIZ);
645+
my_dsi_full_receive(dsi, dsi->commands, DSI_CMDSIZ);
647646
DSICloseSession(conn);
648647
return dsi->header.dsi_code;
649648
}
@@ -770,7 +769,6 @@ static off_t get_off_t(unsigned char **ibuf, int is64)
770769
{
771770
uint32_t temp;
772771
off_t ret;
773-
ret = 0;
774772
memcpy(&temp, *ibuf, sizeof(temp));
775773
ret = ntohl(temp); /* ntohl is unsigned */
776774
*ibuf += sizeof(temp);
@@ -1055,7 +1053,6 @@ void afp_volume_unpack(struct afp_volume_parms *parms, unsigned char *b,
10551053

10561054
if (rbitmap & (1 << VOLPBIT_BSIZE)) {
10571055
memcpy(&l, b, sizeof(l));
1058-
b += sizeof(l);
10591056
parms->bsize = ntohl(l);
10601057
}
10611058
}
@@ -1200,6 +1197,7 @@ void afp_filedir_unpack(struct afp_filedir_parms *filedir, unsigned char *b,
12001197

12011198
if (i != 0) {
12021199
filedir->lname = fp_malloc((beg + i)[0] + 1);
1200+
/* FIXME: what to do with this after Pascal to C conversion? */
12031201
r = strp2c(filedir->lname, beg + i) + 1;
12041202
}
12051203

@@ -1212,6 +1210,7 @@ void afp_filedir_unpack(struct afp_filedir_parms *filedir, unsigned char *b,
12121210

12131211
if (i != 0) {
12141212
filedir->sname = fp_malloc((beg + i)[0] + 1);
1213+
/* FIXME: what to do with this after Pascal to C conversion? */
12151214
r = strp2c(filedir->sname, beg + i) + 1;
12161215
}
12171216

@@ -1617,8 +1616,8 @@ unsigned int AFPWriteHeader(DSI *dsi, uint16_t fork, int offset, int size,
16171616
}
16181617

16191618
/* ------------------------------- */
1620-
unsigned int AFPWriteFooter(DSI *dsi, uint16_t fork, int offset, int size,
1621-
char *data, char whence)
1619+
unsigned int AFPWriteFooter(DSI *dsi, uint16_t fork _U_, int offset, int size,
1620+
char *data _U_, char whence)
16221621
{
16231622
uint32_t last;
16241623
my_dsi_cmd_receive(dsi);
@@ -1990,7 +1989,7 @@ unsigned int AFPBadPacket(CONN *conn, char fn, char *name)
19901989

19911990
/* ------------------------------- */
19921991
unsigned int AFPReadHeader(DSI *dsi, uint16_t fork, int offset, int size,
1993-
char *data)
1992+
char *data _U_)
19941993
{
19951994
int ofs;
19961995
uint32_t temp;
@@ -2014,8 +2013,8 @@ unsigned int AFPReadHeader(DSI *dsi, uint16_t fork, int offset, int size,
20142013
}
20152014

20162015
/* ------------------------------- */
2017-
unsigned int AFPReadFooter(DSI *dsi, uint16_t fork, int offset, int size,
2018-
char *data)
2016+
unsigned int AFPReadFooter(DSI *dsi, uint16_t fork _U_, int offset _U_,
2017+
int size, char *data)
20192018
{
20202019
int rsize;
20212020
my_dsi_cmd_receive(dsi);
@@ -2085,7 +2084,7 @@ unsigned int AFPRead_ext(CONN *conn, uint16_t fork, off_t offset, off_t size,
20852084
}
20862085

20872086
unsigned int AFPRead_ext_async(CONN *conn, uint16_t fork, off_t offset,
2088-
off_t size, char *data)
2087+
off_t size, char *data _U_)
20892088
{
20902089
int ofs;
20912090
DSI *dsi;
@@ -2125,9 +2124,7 @@ unsigned int AFPCreateDir(CONN *conn, uint16_t vol, int did, char *name)
21252124
my_dsi_cmd_receive(dsi);
21262125

21272126
if (!dsi->header.dsi_code) {
2128-
ofs = 0;
21292127
memcpy(&dir, dsi->commands, sizeof(dir)); /* did */
2130-
ofs += sizeof(dir);
21312128

21322129
if (!Quiet) {
21332130
fprintf(stdout, "directory ID 0x%x\n", ntohl(dir));

0 commit comments

Comments
 (0)