canon: fix [-Wunused-but-set-variable] compiler warnings

merge-requests/1/head
Olaf Meeuwissen 2015-12-23 20:39:15 +09:00
rodzic 592430016c
commit e881843745
2 zmienionych plików z 1 dodań i 10 usunięć

Wyświetl plik

@ -1104,7 +1104,6 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters *params)
SANE_Status
sane_start (SANE_Handle handle)
{
int mode;
char *mode_str;
CANON_Scanner *s = handle;
SANE_Status status;
@ -1301,33 +1300,27 @@ sane_start (SANE_Handle handle)
if (!strcmp (mode_str, SANE_VALUE_SCAN_MODE_LINEART))
{
mode = 4;
s->image_composition = 0;
}
else if (!strcmp (mode_str, SANE_VALUE_SCAN_MODE_HALFTONE))
{
mode = 4;
s->image_composition = 1;
}
else if (!strcmp (mode_str, SANE_VALUE_SCAN_MODE_GRAY))
{
mode = 5;
s->image_composition = 2;
}
else if (!strcmp (mode_str, SANE_VALUE_SCAN_MODE_COLOR)
|| !strcmp (mode_str, SANE_I18N("Fine color")))
{
mode = 6;
s->image_composition = 5;
}
else if (!strcmp (mode_str, SANE_I18N("Raw")))
{
mode = 6;
s->image_composition = 5;
}
else
{
mode = 6;
s->image_composition = 5;
}

Wyświetl plik

@ -688,7 +688,7 @@ static SANE_Status
set_parameters_fs2710 (SANE_Handle handle)
{
CANON_Scanner *s = handle;
int i, j, invert, shadow[4], hilite[4];
int i, j, shadow[4], hilite[4];
double x, b, c;
shadow[1] = s->ShadowR << 4;
@ -700,8 +700,6 @@ set_parameters_fs2710 (SANE_Handle handle)
c = ((double) s->contrast) / 128.0;
b = ((double) (s->brightness - 128)) / 128.0;
invert = strcmp (filmtype_list[1], s->val[OPT_NEGATIVE].s);
for (i = 1; i < 4; i++)
{
for (j = 0; j < 4096; j++)