Skip to content

Commit cc03c6d

Browse files
committed
Retire unread variables.
All could at least potentially receive updates, but they were never consulted or even logged. Signed-off-by: Aaron M. Ucko <[email protected]>
1 parent dfcaef8 commit cc03c6d

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/dblib/bcp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,6 @@ bcp_readfmt(DBPROCESS * dbproc, const char filename[])
16871687
BCP_HOSTCOLINFO hostcol[1];
16881688
FILE *ffile;
16891689
char buffer[1024];
1690-
float lf_version = 0.0;
16911690
int li_numcols = 0;
16921691
int colinfo_count = 0;
16931692

@@ -1704,7 +1703,7 @@ bcp_readfmt(DBPROCESS * dbproc, const char filename[])
17041703
}
17051704

17061705
if ((_bcp_fgets(buffer, sizeof(buffer), ffile)) != NULL) {
1707-
lf_version = (float)atof(buffer);
1706+
/* version (float), ignored */
17081707
} else if (ferror(ffile)) {
17091708
dbperror(dbproc, SYBEBRFF, errno);
17101709
goto Cleanup;

src/tds/read.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,13 @@ static size_t
272272
read_and_convert(TDSSOCKET * tds, TDSICONV * char_conv, size_t * wire_size, char *outbuf,
273273
size_t outbytesleft)
274274
{
275-
int res;
276275
TDSDATAINSTREAM r;
277276
TDSSTATICOUTSTREAM w;
278277

279278
tds_datain_stream_init(&r, tds, *wire_size);
280279
tds_staticout_stream_init(&w, outbuf, outbytesleft);
281280

282-
res = tds_convert_stream(tds, char_conv, to_client, &r.stream, &w.stream);
281+
tds_convert_stream(tds, char_conv, to_client, &r.stream, &w.stream);
283282
*wire_size = r.wire_size;
284283
return (char *) w.stream.buffer - outbuf;
285284
}

src/tds/write.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ tds_put_n(TDSSOCKET * tds, const void *buf, size_t n)
9696
int
9797
tds_put_string(TDSSOCKET * tds, const char *s, int len)
9898
{
99-
int res;
10099
TDSSTATICINSTREAM r;
101100
TDSDATAOUTSTREAM w;
102101
enum TDS_ICONV_ENTRY iconv_entry;
@@ -140,7 +139,8 @@ tds_put_string(TDSSOCKET * tds, const char *s, int len)
140139
tds_staticin_stream_init(&r, s, len);
141140
tds_dataout_stream_init(&w, tds);
142141

143-
res = tds_convert_stream(tds, tds->conn->char_convs[iconv_entry], to_server, &r.stream, &w.stream);
142+
tds_convert_stream(tds, tds->conn->char_convs[iconv_entry], to_server,
143+
&r.stream, &w.stream);
144144
return (int) w.written;
145145
}
146146

0 commit comments

Comments
 (0)