kopia lustrzana https://gitlab.com/sane-project/backends
Remove set but unused variables which cause compiler warnings
rodzic
a82a312d85
commit
47fd7538bc
|
@ -351,9 +351,6 @@ static void
|
|||
finish_shading_buffer (Artec48U_Scanner * s, SANE_Bool white)
|
||||
{
|
||||
unsigned int i, j, cnt, c, div;
|
||||
unsigned long max_r;
|
||||
unsigned long max_g;
|
||||
unsigned long max_b;
|
||||
unsigned char *shading_buffer;
|
||||
cnt = 0;
|
||||
|
||||
|
@ -379,18 +376,12 @@ finish_shading_buffer (Artec48U_Scanner * s, SANE_Bool white)
|
|||
++cnt;
|
||||
}
|
||||
}
|
||||
max_r = 0;
|
||||
max_g = 0;
|
||||
max_b = 0;
|
||||
|
||||
for (c = 0; c < (30720 * s->dev->epro_mult) - 5; c += 6) /*epro*/
|
||||
{
|
||||
i = (int) shading_buffer[c] + ((int) shading_buffer[c + 1] << 8);
|
||||
max_r += i;
|
||||
i = (int) shading_buffer[c + 2] + ((int) shading_buffer[c + 3] << 8);
|
||||
max_g += i;
|
||||
i = (int) shading_buffer[c + 4] + ((int) shading_buffer[c + 5] << 8);
|
||||
max_b += i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -925,7 +925,6 @@ adjust_color_and_saturation (short red[], short green[], short blue[])
|
|||
int line, column;
|
||||
int r_min = SMAX, g_min = SMAX, b_min = SMAX;
|
||||
int r_max = 0, g_max = 0, b_max = 0;
|
||||
int r_sum = 0, g_sum = 0, b_sum = 0;
|
||||
float sqr_saturation = sqrt (saturation);
|
||||
for (line = TOP_MARGIN; line < HEIGHT - BOTTOM_MARGIN; line++)
|
||||
{
|
||||
|
@ -1008,9 +1007,6 @@ adjust_color_and_saturation (short red[], short green[], short blue[])
|
|||
g_max = g;
|
||||
if (b_max < b)
|
||||
b_max = b;
|
||||
r_sum += r;
|
||||
g_sum += g;
|
||||
b_sum += b;
|
||||
BIDIM_ARRAY (red, column, line, columns) = r;
|
||||
BIDIM_ARRAY (green, column, line, columns) = g;
|
||||
BIDIM_ARRAY (blue, column, line, columns) = b;
|
||||
|
@ -1153,7 +1149,6 @@ output_rgb (const short red[],
|
|||
{
|
||||
int r_min = 255, g_min = 255, b_min = 255;
|
||||
int r_max = 0, g_max = 0, b_max = 0;
|
||||
int r_sum = 0, g_sum = 0, b_sum = 0;
|
||||
int column, line;
|
||||
unsigned char *gamma_table = make_gamma_table (high_i - low_i);
|
||||
|
||||
|
@ -1202,19 +1197,9 @@ output_rgb (const short red[],
|
|||
g_max = g;
|
||||
if (b_max < b)
|
||||
b_max = b;
|
||||
r_sum += r;
|
||||
g_sum += g;
|
||||
b_sum += b;
|
||||
}
|
||||
}
|
||||
free (gamma_table);
|
||||
/*
|
||||
{
|
||||
fprintf (stderr, "%s: output_rgb: r: min = %d, max = %d, ave = %d\n", __progname, r_min, r_max, r_sum / NET_PIXELS);
|
||||
fprintf (stderr, "%s: output_rgb: g: min = %d, max = %d, ave = %d\n", __progname, g_min, g_max, g_sum / NET_PIXELS);
|
||||
fprintf (stderr, "%s: output_rgb: b: min = %d, max = %d, ave = %d\n", __progname, b_min, b_max, b_sum / NET_PIXELS);
|
||||
}
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1530,8 +1530,6 @@ rt_get_available_bytes (void)
|
|||
static int
|
||||
rt_get_data (int bytes, void *data)
|
||||
{
|
||||
int total = 0;
|
||||
|
||||
while (bytes)
|
||||
{
|
||||
int bytesnow = bytes;
|
||||
|
@ -1542,7 +1540,6 @@ rt_get_data (int bytes, void *data)
|
|||
(RTCMD_READBYTES, 0, bytesnow, 0, 0, bytesnow, data) < 0
|
||||
|| rt_execute_commands () < 0)
|
||||
return -1;
|
||||
total += bytesnow;
|
||||
bytes -= bytesnow;
|
||||
data = (char *) data + bytesnow;
|
||||
}
|
||||
|
|
|
@ -941,7 +941,6 @@ compute_dpd (HP4200_Scanner * s, int step_size, int line_end)
|
|||
static SANE_Status
|
||||
read_required_bytes (HP4200_Scanner * s, int required, SANE_Byte * buffer)
|
||||
{
|
||||
int read_count = 0;
|
||||
unsigned char scankb1;
|
||||
unsigned char scankb2;
|
||||
size_t to_read;
|
||||
|
@ -987,7 +986,6 @@ read_required_bytes (HP4200_Scanner * s, int required, SANE_Byte * buffer)
|
|||
buffer += really_read;
|
||||
required -= really_read;
|
||||
to_read -= really_read;
|
||||
read_count += really_read;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue