Remove dead code due to unused variables

This fixes some occurrences of the following GCC warning:

warning: variable '...' set but not used
merge-requests/1/head
Volker Diels-Grabsch 2015-12-06 03:32:51 +01:00 zatwierdzone przez Olaf Meeuwissen
rodzic aba87a4582
commit 7c8c8e29be
5 zmienionych plików z 2 dodań i 12 usunięć

Wyświetl plik

@ -1340,7 +1340,7 @@ ProcessUdpResponse (unsigned char *pData, size_t size,
{ {
unsigned short messageSize, nameSize, valueSize; unsigned short messageSize, nameSize, valueSize;
unsigned char *pItem, *pEnd, *pValue; unsigned char *pItem, *pEnd;
char sockBuf[SOCK_BUF_SIZE], *pName; char sockBuf[SOCK_BUF_SIZE], *pName;
struct ComBuf tcpBuf; struct ComBuf tcpBuf;
int nread; int nread;
@ -1381,8 +1381,6 @@ ProcessUdpResponse (unsigned char *pData, size_t size,
valueSize = (((unsigned short) pItem[0]) << 8) | pItem[1]; valueSize = (((unsigned short) pItem[0]) << 8) | pItem[1];
pItem += 2; pItem += 2;
pValue = pItem;
pItem += valueSize; pItem += valueSize;
/* process the item */ /* process the item */

Wyświetl plik

@ -4232,7 +4232,7 @@ SANE_Status
sane_get_parameters (SANE_Handle handle, SANE_Parameters * params) sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
{ {
Epson_Scanner *s = (Epson_Scanner *) handle; Epson_Scanner *s = (Epson_Scanner *) handle;
int ndpi, max_x, max_y; int ndpi;
int bytes_per_pixel; int bytes_per_pixel;
DBG (5, "sane_get_parameters()\n"); DBG (5, "sane_get_parameters()\n");
@ -4270,8 +4270,6 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
ndpi = s->val[OPT_RESOLUTION].w; ndpi = s->val[OPT_RESOLUTION].w;
max_x = max_y = 0;
s->params.pixels_per_line = s->params.pixels_per_line =
SANE_UNFIX (s->val[OPT_BR_X].w - s->val[OPT_TL_X].w) / 25.4 * ndpi + 0.5; SANE_UNFIX (s->val[OPT_BR_X].w - s->val[OPT_TL_X].w) / 25.4 * ndpi + 0.5;
s->params.lines = s->params.lines =

Wyświetl plik

@ -249,7 +249,6 @@ sanei_hp_device_probe_model (enum hp_device_compat_e *compat, HpScsi scsi,
}; };
int i; int i;
char buf[8]; char buf[8];
size_t len;
SANE_Status status; SANE_Status status;
static char *last_device = NULL; static char *last_device = NULL;
static enum hp_device_compat_e last_compat; static enum hp_device_compat_e last_compat;
@ -279,7 +278,6 @@ sanei_hp_device_probe_model (enum hp_device_compat_e *compat, HpScsi scsi,
{ {
DBG(1,"probing %s\n",probes[i].model); DBG(1,"probing %s\n",probes[i].model);
len = sizeof(buf);
if (!FAILED( status = sanei_hp_scl_upload(scsi, probes[i].cmd, if (!FAILED( status = sanei_hp_scl_upload(scsi, probes[i].cmd,
buf, sizeof(buf)) )) buf, sizeof(buf)) ))
{ {

Wyświetl plik

@ -3109,7 +3109,6 @@ rts8801_scan (unsigned x,
unsigned aiBestOffset[3]; unsigned aiBestOffset[3];
int i; int i;
unsigned j; unsigned j;
int anychanged;
int calibration_size; int calibration_size;
unsigned char *pDetailedCalib; unsigned char *pDetailedCalib;
int red_calibration_offset; int red_calibration_offset;
@ -3166,7 +3165,6 @@ rts8801_scan (unsigned x,
do do
{ {
DBG (30, "Initial calibration pass commences\n"); DBG (30, "Initial calibration pass commences\n");
anychanged = 0;
for (i = 0; i < 3; ++i) for (i = 0; i < 3; ++i)
{ {

Wyświetl plik

@ -461,7 +461,6 @@ sanei_ab306_rdata (int fd, int planes, SANE_Byte * buf, int lines, int bpl)
{ {
Port *p = port + fd; Port *p = port + fd;
int lcnt, pcnt, bcnt, xmax; int lcnt, pcnt, bcnt, xmax;
SANE_Byte *lsave_bp;
int nstat; int nstat;
DBG(2, "sanei_ab306_rdata: start\n"); DBG(2, "sanei_ab306_rdata: start\n");
@ -471,7 +470,6 @@ sanei_ab306_rdata (int fd, int planes, SANE_Byte * buf, int lines, int bpl)
/* the lines-loop: */ /* the lines-loop: */
for (lcnt = 0; lcnt < lines; ++lcnt) for (lcnt = 0; lcnt < lines; ++lcnt)
{ {
lsave_bp = buf;
/* the planes-loop: */ /* the planes-loop: */
for (pcnt = 0; pcnt < planes; ++pcnt) for (pcnt = 0; pcnt < planes; ++pcnt)
{ {