Replace variable self-assignments to avoid Clang warnings

These were intended to suppress GCC warnings about unused variables.
However, this leads to different warnings from Clang instead.

Use another approach that suppresses warnings from both compilers.
merge-requests/701/head
David Ward 2022-03-08 19:00:00 -05:00
rodzic 6be83f469b
commit f3162bafa8
57 zmienionych plików z 298 dodań i 298 usunięć

Wyświetl plik

@ -236,8 +236,8 @@ wait_ready (int fd)
static SANE_Status
sense_handler (int scsi_fd, u_char * result, void *arg)
{
scsi_fd = scsi_fd; /* silence gcc */
arg = arg; /* silence gcc */
(void) scsi_fd; /* silence gcc */
(void) arg; /* silence gcc */
switch (result[2] & 0x0F)
{
@ -850,7 +850,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG_INIT ();
@ -915,7 +915,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
Abaton_Device *dev;
int i;
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
if (devlist)
free (devlist);
@ -1472,8 +1472,8 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
handle = handle; /* silence gcc */
non_blocking = non_blocking; /* silence gcc */
(void) handle; /* silence gcc */
(void) non_blocking; /* silence gcc */
DBG (FLOW_CONTROL, "sane_set_io_mode: Don't call me please. "
"Unimplemented function\n");
@ -1483,8 +1483,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
DBG (FLOW_CONTROL, "sane_get_select_fd: Don't call me please. "
"Unimplemented function\n");

Wyświetl plik

@ -236,8 +236,8 @@ test_ready (int fd)
static SANE_Status
sense_handler (int scsi_fd, u_char *result, void *arg)
{
scsi_fd = scsi_fd; /* silence gcc */
arg = arg; /* silence gcc */
(void) scsi_fd; /* silence gcc */
(void) arg; /* silence gcc */
if (result[0])
{
@ -253,7 +253,7 @@ sense_handler (int scsi_fd, u_char *result, void *arg)
static SANE_Status
stop_scan (int fd)
{
fd = fd; /* silence gcc */
(void) fd; /* silence gcc */
/* XXX don't know how to stop the scanner. To be tested ! */
#if 0
@ -1280,7 +1280,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG_INIT ();
@ -1335,7 +1335,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
AgfaFocus_Device *dev;
int i;
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
if (devlist)
free (devlist);

Wyświetl plik

@ -328,8 +328,8 @@ return SANE_STATUS_GOOD;
static SANE_Status
sense_handler (int scsi_fd, u_char * result, void *arg)
{
scsi_fd = scsi_fd; /* silence gcc */
arg = arg; /* silence gcc */
(void) scsi_fd; /* silence gcc */
(void) arg; /* silence gcc */
switch (result[2] & 0x0F)
{
@ -1866,7 +1866,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG_INIT ();
@ -1930,7 +1930,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
Apple_Device *dev;
int i;
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
if (devlist)
free (devlist);
@ -2667,7 +2667,7 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
DBG (FLOW_CONTROL,"sane_set_io_mode: Entering.\n");
handle = handle; /* silence gcc */
(void) handle; /* silence gcc */
if (non_blocking)
{
@ -2682,8 +2682,8 @@ return SANE_STATUS_GOOD;
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
DBG (FLOW_CONTROL, "sane_get_select_fd: Don't call me please. "
"Unimplemented function\n");

Wyświetl plik

@ -2158,8 +2158,8 @@ sense_handler (int fd, u_char* sense, void* arg)
uint8_t sense_key = sense[2] & 0xf;
uint8_t additional_sense = sense[7];
fd = fd; /* silence gcc */
arg = arg; /* silence gcc */
(void) fd; /* silence gcc */
(void) arg; /* silence gcc */
DBG (3, "sense_handler:\n");
@ -8451,7 +8451,7 @@ sane_reload_devices (void)
SANE_Status
sane_init (SANE_Int* version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG_INIT();
@ -8500,7 +8500,7 @@ sane_get_devices (const SANE_Device*** device_list, SANE_Bool local_only)
Avision_Device* dev;
int i;
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
DBG (3, "sane_get_devices:\n");

Wyświetl plik

@ -1979,7 +1979,7 @@ sense_handler (int scsi_fd, u_char *result, void *arg)
SANE_Status status = SANE_STATUS_INVAL;
SANE_Char print_sense[(16 * 3) + 1];
scsi_fd = scsi_fd; /* get rid of compiler warning */
(void) scsi_fd; /* get rid of compiler warning */
ErrorCode = result[0] & 0x7F;
ValidData = (result[0] & 0x80) != 0;
sense = result[2] & 0x0f; /* Key */
@ -3145,7 +3145,7 @@ sane_init (SANE_Int *version_code, SANE_Auth_Callback authorize)
char devnam[PATH_MAX] = "/dev/scanner";
FILE *fp;
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT();
DBG(3, "sane_init called\n");
@ -3233,7 +3233,7 @@ sane_get_devices (const SANE_Device ***device_list, SANE_Bool local)
int i;
DBG(3, "sane_get_devices called\n");
local = local; /* get rid of compiler warning */
(void) local; /* get rid of compiler warning */
if (devlist)
free (devlist);
devlist = malloc ((num_devices + 1) * sizeof (devlist[0]));
@ -3806,7 +3806,7 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
return SANE_STATUS_GOOD;
#else
handle = handle; /* get rid of compiler warning */
(void) handle; /* get rid of compiler warning */
return (non_blocking == 1) ? SANE_STATUS_UNSUPPORTED : SANE_STATUS_GOOD;
#endif
}
@ -3828,7 +3828,7 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int *fd)
return SANE_STATUS_GOOD;
#else
handle = handle; fd = fd; /* get rid of compiler warning */
(void) handle; (void) fd; /* get rid of compiler warning */
return SANE_STATUS_UNSUPPORTED;
#endif
}

Wyświetl plik

@ -1546,7 +1546,7 @@ CANON_open_device (CANON_Handle * scan, const char *dev)
static const char *
CANON_get_device_name (CANON_Handle * scanner)
{
scanner = scanner; /* Eliminate warning about unused parameters */
(void) scanner; /* Eliminate warning about unused parameters */
return "Canoscan FB630U";
}

Wyświetl plik

@ -133,9 +133,9 @@ static SANE_Status
optionNumOptionsCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
info = info; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) info; /* Eliminate warning about unused parameters */
if (action != SANE_ACTION_GET_VALUE)
return SANE_STATUS_INVAL;
@ -168,8 +168,8 @@ static SANE_Status
optionCalibrateCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
handle = handle;
option = option; /* Eliminate warning about unused parameters */
(void) handle;
(void) option; /* Eliminate warning about unused parameters */
switch (action)
{
@ -221,7 +221,7 @@ optionResolutionCallback (SANE_Option * option, SANE_Handle handle,
SANE_Status status;
SANE_Word autoValue = 75;
handle = handle; /* Eliminate warning about unused parameters */
(void) handle; /* Eliminate warning about unused parameters */
switch (action)
{
@ -268,8 +268,8 @@ static SANE_Status
optionGrayscaleCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
handle = handle;
option = option; /* Eliminate warning about unused parameters */
(void) handle;
(void) option; /* Eliminate warning about unused parameters */
switch (action)
{
@ -315,9 +315,9 @@ static SANE_Status
optionAGainCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
info = info; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) info; /* Eliminate warning about unused parameters */
switch (action)
{
@ -357,9 +357,9 @@ static SANE_Status
optionGammaCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
info = info; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) info; /* Eliminate warning about unused parameters */
switch (action)
{
@ -418,9 +418,9 @@ static SANE_Status
optionTopLeftXCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
value = value; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) value; /* Eliminate warning about unused parameters */
switch (action)
{
@ -462,8 +462,8 @@ optionTopLeftYCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -506,8 +506,8 @@ optionBotRightXCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -550,8 +550,8 @@ optionBotRightYCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -912,7 +912,7 @@ sane_close (SANE_Handle handle)
const SANE_Option_Descriptor *
sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
{
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3, "sane_get_option_descriptor: option = %d\n", option);
if (option < 0 || option >= NELEMS (so))
@ -924,7 +924,7 @@ SANE_Status
sane_control_option (SANE_Handle handle, SANE_Int option,
SANE_Action action, void *value, SANE_Int * info)
{
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3,
"sane_control_option: handle=%p, opt=%d, act=%d, val=%p, info=%p\n",
@ -945,7 +945,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
SANE_UNFIX (optionBotRightYValue -
optionTopLeftYValue) / MM_IN_INCH * optionResolutionValue;
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3, "sane_get_parameters\n");
parms.depth = 8;
@ -1035,7 +1035,7 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -494,7 +494,7 @@ static struct scanner *scanner_devList = NULL;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init: start\n");
@ -547,7 +547,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int num_devices=0;
int i=0;
local_only = local_only; /* get rid of compiler warning */
(void) local_only; /* get rid of compiler warning */
DBG (10, "sane_get_devices: start\n");
@ -7233,7 +7233,7 @@ sense_handler (int fd, unsigned char * sensed_data, void *arg)
DBG (5, "sense_handler: start\n");
/* kill compiler warning */
fd = fd;
(void) fd;
/* copy the rs return data into the scanner struct
so that the caller can use it if he wants
@ -7494,8 +7494,8 @@ do_scsi_cmd(struct scanner *s, int runRS, int timeout,
int ret;
/*shut up compiler*/
runRS=runRS;
timeout=timeout;
(void) runRS;
(void) timeout;
DBG(10, "do_scsi_cmd: start\n");

Wyświetl plik

@ -956,7 +956,7 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -271,7 +271,7 @@ static struct scanner *scanner_devList = NULL;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init: start\n");
@ -323,7 +323,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int num_devices=0;
int i=0;
local_only = local_only; /* get rid of compiler warning */
(void) local_only; /* get rid of compiler warning */
DBG (10, "sane_get_devices: start\n");

Wyświetl plik

@ -1853,8 +1853,8 @@ hexdump (int level, char *comment, unsigned char *p, int l)
static SANE_Status
sense_handler (int scsi_fd, unsigned char * result, void *arg)
{
scsi_fd = scsi_fd;
arg = arg;
(void) scsi_fd;
(void) arg;
if (result[0] != 0x70)
{
@ -2155,7 +2155,7 @@ attach_one (const char *devName)
static void
sigterm_handler (int signal)
{
signal = signal;
(void) signal;
sanei_scsi_req_flush_all (); /* flush SCSI queue */
_exit (SANE_STATUS_GOOD);
}
@ -2360,7 +2360,7 @@ static int RGBIfix16(Coolscan_t * scanner,
unsigned short *opr,*opg,*opb,*opi;
int x;
scanner = scanner; lutr = lutr; lutg = lutg; lutb = lutb; luti = luti;
(void) scanner; (void) lutr; (void) lutg; (void) lutb; (void) luti;
for(x=0;x<size;x++)
{
@ -2459,7 +2459,7 @@ static int RGBIfix1(unsigned char* rgbimat,unsigned char* orgbimat,
int ii;
int x;
lutg = lutg; lutb = lutb;
(void) lutg; (void) lutb;
/* calculate regression between r and ir */
cc.sum=0;
@ -3237,7 +3237,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize;
(void) authorize;
DBG_INIT ();
sanei_thread_init ();
@ -3297,7 +3297,7 @@ sane_get_devices (const SANE_Device *** device_list,
Coolscan_t *dev;
int i;
local_only = local_only;
(void) local_only;
DBG (10, "sane_get_devices\n");

Wyświetl plik

@ -344,7 +344,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
DBG (10, "sane_init() called.\n");
DBG (1, "coolscan2 backend, version %i.%i.%i initializing.\n", CS2_VERSION_MAJOR, CS2_VERSION_MINOR, CS2_REVISION);
authorize = authorize; /* to shut up compiler */
(void) authorize; /* to shut up compiler */
if (version_code)
*version_code =
@ -378,7 +378,7 @@ sane_get_devices (const SANE_Device *** list, SANE_Bool local_only)
char line[PATH_MAX], *p;
FILE *config;
local_only = local_only; /* to shut up compiler */
(void) local_only; /* to shut up compiler */
DBG (10, "sane_get_devices() called.\n");
@ -1738,8 +1738,8 @@ sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
DBG (10, "sane_get_select_fd() called.\n");
fd = fd; /* to shut up compiler */
s = s; /* to shut up compiler */
(void) fd; /* to shut up compiler */
(void) s; /* to shut up compiler */
return SANE_STATUS_UNSUPPORTED;
}
@ -2003,7 +2003,7 @@ cs2_scsi_sense_handler (int fd, u_char * sense_buffer, void *arg)
{
cs2_t *s = (cs2_t *) arg;
fd = fd; /* to shut up compiler */
(void) fd; /* to shut up compiler */
/* sort this out ! XXXXXXXXX */

Wyświetl plik

@ -314,7 +314,7 @@ sane_init(SANE_Int * version_code, SANE_Auth_Callback authorize)
DBG(1, "coolscan3 backend, version %i.%i.%i initializing.\n",
CS3_VERSION_MAJOR, CS3_VERSION_MINOR, CS3_REVISION);
authorize = authorize; /* to shut up compiler */
(void) authorize; /* to shut up compiler */
if (version_code)
*version_code = SANE_VERSION_CODE(SANE_CURRENT_MAJOR, SANE_CURRENT_MINOR, 0);
@ -346,7 +346,7 @@ sane_get_devices(const SANE_Device *** list, SANE_Bool local_only)
char line[PATH_MAX], *p;
FILE *config;
local_only = local_only; /* to shut up compiler */
(void) local_only; /* to shut up compiler */
DBG(10, "%s\n", __func__);
@ -1746,8 +1746,8 @@ sane_get_select_fd(SANE_Handle h, SANE_Int * fd)
DBG(10, "%s\n", __func__);
fd = fd; /* to shut up compiler */
s = s; /* to shut up compiler */
(void) fd; /* to shut up compiler */
(void) s; /* to shut up compiler */
return SANE_STATUS_UNSUPPORTED;
}
@ -2026,7 +2026,7 @@ cs3_scsi_sense_handler(int fd, u_char * sense_buffer, void *arg)
{
cs3_t *s = (cs3_t *) arg;
fd = fd; /* to shut up compiler */
(void) fd; /* to shut up compiler */
/* sort this out ! XXX */

Wyświetl plik

@ -812,7 +812,7 @@ sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize;
(void) authorize;
DBG_INIT();
if (version_code) {
@ -891,7 +891,7 @@ sane_get_devices(SANE_Device const ***device_list, SANE_Bool local_only)
DMC_Device *dev;
int i = 0;
local_only = local_only;
(void) local_only;
if (devlist) free(devlist);
devlist = malloc((NumDevices+1) * sizeof(devlist[0]));
@ -1392,8 +1392,8 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
handle = handle;
non_blocking = non_blocking;
(void) handle;
(void) non_blocking;
return SANE_STATUS_UNSUPPORTED;
}
@ -1401,8 +1401,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int *fd)
{
handle = handle;
fd = fd;
(void) handle;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -271,7 +271,7 @@ static struct scanner *scanner_devList = NULL;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init: start\n");
@ -323,7 +323,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int num_devices=0;
int i=0;
local_only = local_only; /* get rid of compiler warning */
(void) local_only; /* get rid of compiler warning */
DBG (10, "sane_get_devices: start\n");

Wyświetl plik

@ -2653,7 +2653,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
/* sanei_authorization(devicename, STRINGIFY(BACKEND_NAME), auth_callback); */
@ -2753,7 +2753,7 @@ sane_get_devices (const SANE_Device * **device_list, SANE_Bool local_only)
DBG (5, "sane_get_devices()\n");
local_only = local_only; /* just to get rid of the compiler warning */
(void) local_only; /* just to get rid of the compiler warning */
if (devlist)
{
@ -6383,8 +6383,8 @@ SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
/* get rid of compiler warning */
handle = handle;
non_blocking = non_blocking;
(void) handle;
(void) non_blocking;
return SANE_STATUS_UNSUPPORTED;
}
@ -6399,8 +6399,8 @@ SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
/* get rid of compiler warnings */
handle = handle;
fd = fd;
(void) handle;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -27,8 +27,8 @@ sanei_epson2_scsi_sense_handler(int scsi_fd,
unsigned char *result, void *arg)
{
/* to get rid of warnings */
scsi_fd = scsi_fd;
arg = arg;
(void) scsi_fd;
(void) arg;
if (result[0] && result[0] != 0x70) {
DBG(2, "%s: sense code = 0x%02x\n",

Wyświetl plik

@ -32,8 +32,8 @@ SANE_Status
sanei_epson_scsi_sense_handler (int scsi_fd, u_char * result, void *arg)
{
/* to get rid of warnings */
scsi_fd = scsi_fd;
arg = arg;
(void) scsi_fd;
(void) arg;
if (result[0] && result[0] != 0x70)
{

Wyświetl plik

@ -784,7 +784,7 @@ static SANE_Status stat_cb(void *userdata, char *token, int len)
{
char *value = token + 3;
userdata = userdata;
(void) userdata;
if (DBG_LEVEL >= 11) {
debug_token(DBG_LEVEL, __func__, token, len);
@ -816,7 +816,7 @@ static SANE_Status resa_cb(void *userdata, char *token, int len)
{
/* epsonds_scanner *s = (epsonds_scanner *)userdata; */
userdata = userdata;
(void) userdata;
if (DBG_LEVEL >= 11) {
debug_token(DBG_LEVEL, __func__, token, len);
@ -838,7 +838,7 @@ static SANE_Status para_cb(void *userdata, char *token, int len)
debug_token(DBG_LEVEL, __func__, token, len);
}
userdata = userdata;
(void) userdata;
if (strncmp("par", token, 3) == 0) {
if (strncmp("FAIL", token + 3, 4) == 0) {

Wyświetl plik

@ -764,7 +764,7 @@ static struct fujitsu *fujitsu_devList = NULL;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init: start\n");
@ -819,7 +819,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int num_devices=0;
int i=0;
local_only = local_only; /* get rid of compiler warning */
(void) local_only; /* get rid of compiler warning */
DBG (10, "sane_get_devices: start\n");
@ -9270,7 +9270,7 @@ sense_handler (int fd, unsigned char * sensed_data, void *arg)
DBG (5, "sense_handler: start\n");
/* kill compiler warning */
fd = fd;
(void) fd;
/* copy the rs return data into the scanner struct
so that the caller can use it if he wants */
@ -9605,8 +9605,8 @@ do_scsi_cmd(struct fujitsu *s, int runRS, int shortTime,
int ret;
/*shut up compiler*/
runRS=runRS;
shortTime=shortTime;
(void) runRS;
(void) shortTime;
DBG(10, "do_scsi_cmd: start\n");

Wyświetl plik

@ -265,7 +265,7 @@ static const SANE_Device **devlist = 0;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init\n");
@ -1117,7 +1117,7 @@ init_options (struct hp3500_data *scanner)
static void
do_reset (struct hp3500_data *scanner)
{
scanner = scanner; /* kill warning */
(void) scanner; /* kill warning */
}
static void
@ -2774,7 +2774,7 @@ rts8801_doscan (unsigned width,
int result = 0;
unsigned rows_supplied = 0;
calib_info = calib_info; /* Kill warning */
(void) calib_info; /* Kill warning */
if (cancelled_scan)
return -1;
rt_start_moving ();
@ -3784,7 +3784,7 @@ writefunc (struct hp3500_write_info *winfo, int bytes, char *data)
static void
sigtermHandler (int signal)
{
signal = signal; /* get rid of compiler warning */
(void) signal; /* get rid of compiler warning */
cancelled_scan = 1;
}
#endif

Wyświetl plik

@ -2719,7 +2719,7 @@ static SANE_Int bq5550_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *
SANE_Int rst = ERROR;
/* silence compiler */
usb = usb;
(void) usb;
if (mymode != NULL)
{

Wyświetl plik

@ -600,15 +600,15 @@ dbg_tiff_save (char *sFile, SANE_Int width, SANE_Int height, SANE_Int depth,
}
#else
/* silent gcc */
sFile = sFile;
width = width;
height = height;
depth = depth;
colortype = colortype;
res_x = res_x;
res_y = res_y;
buffer = buffer;
size = size;
(void) sFile;
(void) width;
(void) height;
(void) depth;
(void) colortype;
(void) res_x;
(void) res_y;
(void) buffer;
(void) size;
DBG (DBG_ERR, "- dbg_tiff_save: tiffio not supported\n");
#endif

Wyświetl plik

@ -7703,7 +7703,7 @@ Scan_Read_BufferA (struct st_device *dev, SANE_Int buffer_size, SANE_Int arg2,
"+ Scan_Read_BufferA(buffer_size=%i, arg2, *pBuffer, *bytes_transferred):\n",
buffer_size);
arg2 = arg2; /* silence gcc */
(void) arg2; /* silence gcc */
*bytes_transferred = 0;
if (pBuffer != NULL)
@ -11364,7 +11364,7 @@ Calib_CreateBuffers (struct st_device *dev, struct st_calibration *buffer,
SANE_Int ebp, ret, channel;
ret = ERROR;
dev = dev;
(void) dev;
buffer->shadinglength = scan.coord.width;
ebp = 0x14;
@ -12602,9 +12602,9 @@ Calib_BWShading (struct st_calibration_config *calibcfg,
/*falta codigo */
/*silence gcc */
calibcfg = calibcfg;
myCalib = myCalib;
gainmode = gainmode;
(void) calibcfg;
(void) myCalib;
(void) gainmode;
return OK;
}
@ -13624,7 +13624,7 @@ Calibration (struct st_device *dev, SANE_Byte * Regs,
DBG (DBG_FNC, "> Calibration\n");
dbg_ScanParams (scancfg);
value = value; /*silence gcc */
(void) value; /*silence gcc */
memcpy (&calibdata->Regs, Regs, sizeof (SANE_Byte) * RT_BUFFER_LEN);

Wyświetl plik

@ -380,7 +380,7 @@ bknd_colormodes (TScanner * scanner, SANE_Int model)
{ SANE_VALUE_SCAN_MODE_COLOR, SANE_VALUE_SCAN_MODE_GRAY, SANE_VALUE_SCAN_MODE_LINEART, 0 };
/* silence gcc */
model = model;
(void) model;
colormode = (SANE_String_Const *) malloc (sizeof (mycolormode));
if (colormode != NULL)
@ -460,7 +460,7 @@ bknd_depths (TScanner * scanner, SANE_Int model)
SANE_Int mydepth[] = { 2, 8, 16 }; /*{3, 8, 12, 16}; */
/* silence gcc */
model = model;
(void) model;
depth = (SANE_Int *) malloc (sizeof (mydepth));
if (depth != NULL)
@ -1760,7 +1760,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
DBG (DBG_FNC, "> sane_init\n");
/* silence gcc */
authorize = authorize;
(void) authorize;
/* Initialize usb */
sanei_usb_init ();
@ -1816,7 +1816,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
{
SANE_Status rst = SANE_STATUS_GOOD;
local_only = local_only;
(void) local_only;
if (_pSaneDevList)
free (_pSaneDevList);
@ -2654,7 +2654,7 @@ sane_cancel (SANE_Handle h)
DBG (DBG_FNC, "> sane_cancel\n");
/* silence gcc */
h = h;
(void) h;
device->status->cancel = TRUE;
}
@ -2665,8 +2665,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
DBG (DBG_FNC, "> sane_set_io_mode\n");
/* silence gcc */
handle = handle;
non_blocking = non_blocking;
(void) handle;
(void) non_blocking;
return SANE_STATUS_UNSUPPORTED;
}
@ -2677,8 +2677,8 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
DBG (DBG_FNC, "> sane_get_select_fd\n");
/* silence gcc */
handle = handle;
fd = fd;
(void) handle;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -2369,7 +2369,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
char dev_name[PATH_MAX];
FILE *fp;
authorize = authorize; /* keep gcc quiet */
(void) authorize; /* keep gcc quiet */
DBG_INIT ();
@ -2939,7 +2939,7 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
HP4200_Scanner *dev = handle;
SANE_Status status;
non_blocking = non_blocking; /* silence gcc */
(void) non_blocking; /* silence gcc */
if (dev->scanning == SANE_FALSE)
{
@ -2965,8 +2965,8 @@ sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
{
static char me[] = "sane_get_select_fd";
h = h; /* keep gcc quiet */
fd = fd; /* keep gcc quiet */
(void) h; /* keep gcc quiet */
(void) fd; /* keep gcc quiet */
DBG (DBG_proc, "%s\n", me);
return SANE_STATUS_UNSUPPORTED;

Wyświetl plik

@ -483,7 +483,7 @@ void
CircBufferInit (int iHandle, TDataPipe * p, int iBytesPerLine,
int bpp, int iMisAlignment, int blksize, int iTransferSize)
{
iHandle = iHandle; /* to avoid compilation warning */
(void) iHandle; /* to avoid compilation warning */
p->buffersize = max (BUFFER_SIZE, 3 * blksize);
if (p->buffer)
@ -746,7 +746,7 @@ HP5400_SANE_STATIC
int
hp5400_test_scan_response (struct ScanResponse *resp, struct ScanRequest *req)
{
req = req; /* to avoid compilation warning */
(void) req; /* to avoid compilation warning */
HP5400_DBG (DBG_MSG, "Scan response:\n");
HP5400_DBG (DBG_MSG, " transfersize=%d htonl-> %d\n", resp->transfersize,
htonl (resp->transfersize));
@ -828,7 +828,7 @@ DoScan (int iHandle, struct ScanRequest *req, const char *filename, int code,
/* int bpp, planes; */
int i;
code = code; /*to avoid compilation warning*/
(void) code; /*to avoid compilation warning*/
if (res == NULL)
res = &res_temp;
@ -1011,7 +1011,7 @@ hp5400_scan (int iHandle, TScanParams * params, THWParams * pHWParams,
struct ScanResponse res;
int result;
pHWParams = pHWParams; /*to avoid compilation warning*/
(void) pHWParams; /*to avoid compilation warning*/
HP5400_DBG (DBG_MSG, "\n");
HP5400_DBG (DBG_MSG, "Scanning :\n");

Wyświetl plik

@ -611,7 +611,7 @@ sane_init (SANE_Int * piVersion, SANE_Auth_Callback pfnAuth)
int nline = 0;
/* prevent compiler from complaining about unused parameters */
pfnAuth = pfnAuth;
(void) pfnAuth;
strcpy(usb_devfile, "/dev/usb/scanner0");
_pFirstSaneDev = 0;
@ -712,7 +712,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
HP5400_DBG (DBG_MSG, "sane_get_devices\n");
local_only = local_only;
(void) local_only;
if (_pSaneDevList)
{
@ -1333,7 +1333,7 @@ sane_set_io_mode (SANE_Handle h, SANE_Bool m)
HP5400_DBG (DBG_MSG, "sane_set_io_mode %s\n", m ? "non-blocking" : "blocking");
/* prevent compiler from complaining about unused parameters */
h = h;
(void) h;
if (m)
{
@ -1349,8 +1349,8 @@ sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
HP5400_DBG (DBG_MSG, "sane_select_fd\n");
/* prevent compiler from complaining about unused parameters */
h = h;
fd = fd;
(void) h;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -3322,8 +3322,8 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
*fd = s->fd;
return SANE_STATUS_GOOD;
#else
handle = handle;
fd = fd; /* get rid of compiler warning */
(void) handle;
(void) fd; /* get rid of compiler warning */
DBG (DBG_proc, "<< sane_get_select_fd\n");
return SANE_STATUS_UNSUPPORTED;
#endif

Wyświetl plik

@ -175,7 +175,7 @@ static struct scanner *scanner_devList = NULL;
SANE_Status
sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
DBG_INIT ();
DBG (10, "sane_init: start\n");
@ -225,7 +225,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int num_devices=0;
int i=0;
local_only = local_only; /* get rid of compiler warning */
(void) local_only; /* get rid of compiler warning */
DBG (10, "sane_get_devices: start\n");
@ -2550,7 +2550,7 @@ sense_handler (int fd, unsigned char * sensed_data, void *arg)
DBG (5, "sense_handler: start\n");
/* kill compiler warning */
fd = fd;
(void) fd;
/* save for later */
s->rs_info = get_RS_information (sensed_data);
@ -2754,8 +2754,8 @@ do_cmd(struct scanner *s, int runRS, int shortTime,
SANE_Status ret = SANE_STATUS_GOOD;
/*shut up compiler*/
runRS=runRS;
shortTime=shortTime;
(void) runRS;
(void) shortTime;
DBG(10, "do_cmd: start\n");

Wyświetl plik

@ -442,15 +442,15 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle h, SANE_Bool m)
{
h=h;
m=m;
(void) h;
(void) m;
return SANE_STATUS_UNSUPPORTED;
}
SANE_Status
sane_get_select_fd (SANE_Handle h, SANE_Int * fd)
{
h=h;
fd=fd;
(void) h;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -3060,7 +3060,7 @@ sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize;
(void) authorize;
DBG_INIT();
DBG(1, "sane_init: MICROTEK says hello! (v%d.%d.%d)\n",
MICROTEK_MAJOR, MICROTEK_MINOR, MICROTEK_PATCH);
@ -3111,7 +3111,7 @@ sane_get_devices(const SANE_Device ***device_list,
Microtek_Device *dev;
int i;
local_only = local_only;
(void) local_only;
DBG(10, "sane_get_devices\n");
/* we keep an internal copy */
if (devlist)
@ -4166,7 +4166,7 @@ SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
DBG(10, "sane_set_io_mode...\n");
handle = handle;
(void) handle;
if (non_blocking)
return SANE_STATUS_UNSUPPORTED;
else
@ -4182,6 +4182,6 @@ SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
DBG(10, "sane_get_select_fd...\n");
handle = handle, fd = fd;
(void) handle, (void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -2092,7 +2092,7 @@ SetMotorCurrent (PAsic chip, unsigned short dwMotorSpeed,
STATUS status = STATUS_GOOD;
DBG (DBG_ASIC, "SetMotorCurrent:Enter\n");
chip = chip;
(void) chip;
if (dwMotorSpeed < 2000)
{
@ -4596,7 +4596,7 @@ static STATUS
Asic_SetMotorType (PAsic chip, SANE_Bool isMotorMove, SANE_Bool isUniformSpeed)
{
STATUS status = STATUS_GOOD;
isUniformSpeed = isUniformSpeed;
(void) isUniformSpeed;
DBG (DBG_ASIC, "Asic_SetMotorType:Enter\n");
if (isMotorMove)
@ -4680,7 +4680,7 @@ Asic_CarriageHome (PAsic chip, SANE_Bool isTA)
{
STATUS status = STATUS_GOOD;
SANE_Bool LampHome, TAHome;
isTA = isTA;
(void) isTA;
DBG (DBG_ASIC, "Asic_CarriageHome:Enter\n");
@ -4705,7 +4705,7 @@ Asic_SetShadingTable (PAsic chip, unsigned short * lpWhiteShading,
double dbXRatioAdderDouble;
unsigned int wShadingTableSize;
wX = wX;
(void) wX;
DBG (DBG_ASIC, "Asic_SetShadingTable:Enter\n");
if (chip->firmwarestate < FS_OPENED)
@ -4807,7 +4807,7 @@ Asic_WaitCarriageHome (PAsic chip, SANE_Bool isTA)
SANE_Bool LampHome, TAHome;
int i;
isTA = isTA;
(void) isTA;
DBG (DBG_ASIC, "Asic_WaitCarriageHome:Enter\n");

Wyświetl plik

@ -2132,7 +2132,7 @@ MustScanner_GetMono16BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePos = 0;
unsigned short i;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono16BitLine: call in\n");
@ -2228,7 +2228,7 @@ MustScanner_GetMono16BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert
unsigned short i;
SANE_Byte * lpTemp = lpLine;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono16BitLine1200DPI: call in\n");
TotalXferLines = 0;
@ -2407,7 +2407,7 @@ MustScanner_GetMono8BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short i;
unsigned short wLinePos = 0;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono8BitLine: call in\n");
TotalXferLines = 0;
@ -2502,7 +2502,7 @@ MustScanner_GetMono8BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short i;
SANE_Byte bNextPixel = 0;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono8BitLine1200DPI: call in\n");
TotalXferLines = 0;
@ -2660,7 +2660,7 @@ MustScanner_GetMono1BitLine (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePos;
unsigned short i;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono1BitLine: call in\n");
@ -2752,7 +2752,7 @@ MustScanner_GetMono1BitLine1200DPI (SANE_Byte * lpLine, SANE_Bool isOrderInvert,
unsigned short wLinePosOdd;
unsigned short wLinePosEven;
isOrderInvert = isOrderInvert;
(void) isOrderInvert;
DBG (DBG_FUNC, "MustScanner_GetMono1BitLine1200DPI: call in\n");
@ -2919,7 +2919,7 @@ MustScanner_CalculateMaxMin (SANE_Byte * pBuffer, unsigned short * lpMaxValue,
unsigned short *wSecData = NULL, *wDarkSecData = NULL;
int i, j;
wResolution = wResolution;
(void) wResolution;
wSecData = (unsigned short *) malloc (sizeof (unsigned short) * g_nSecNum);
if (wSecData == NULL)
@ -3001,7 +3001,7 @@ MustScanner_ReadDataFromScanner (void * dummy)
unsigned short wScanLinesThisBlock;
unsigned short wBufferLines = g_wLineDistance * 2 + g_wPixelDistance;
dummy = dummy;
(void) dummy;
DBG (DBG_FUNC,
"MustScanner_ReadDataFromScanner: call in, and in new thread\n");

Wyświetl plik

@ -362,7 +362,7 @@ Reflective_SetupScan (COLORMODE ColorMode,
unsigned short YDpi,
SANE_Bool isInvert, unsigned short X, unsigned short Y, unsigned short Width, unsigned short Height)
{
isInvert = isInvert;
(void) isInvert;
DBG (DBG_FUNC, "Reflective_SetupScan: Call in\n");
if (g_bOpened)
{

Wyświetl plik

@ -305,7 +305,7 @@ Transparent_SetupScan (COLORMODE ColorMode, unsigned short XDpi, unsigned short
SANE_Bool hasTA;
unsigned short wTAShadingMinus = 0;
isInvert = isInvert;
(void) isInvert;
DBG (DBG_FUNC, "Transparent_SetupScan: call in\n");
if (g_bOpened)

Wyświetl plik

@ -290,7 +290,7 @@ sense_handler(int fd, u_char *sense_buffer, void *ss)
int sense_key;
NEC_Sense_Data *sdat = (NEC_Sense_Data *) ss;
fd = fd; /* silence compilation warnings */
(void) fd; /* silence compilation warnings */
#define add_sense_code sense_buffer[12]
#define add_sense_qual sense_buffer[13]
@ -1890,7 +1890,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
NEC_New_Device *np;
int i;
authorize = authorize; /* silence compilation warnings */
(void) authorize; /* silence compilation warnings */
DBG_INIT ();
DBG (10, "<< sane_init ");
@ -2079,7 +2079,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
int i;
DBG (10, "<< sane_get_devices ");
local_only = local_only; /* silence compilation warnings */
(void) local_only; /* silence compilation warnings */
if (devlist)
free (devlist);
@ -2714,7 +2714,7 @@ send_binary_g_table(NEC_Scanner *s, SANE_Word *a, int dtq)
SANE_Status status;
unsigned int i, j;
dtq = dtq; /* silence compilation warnings */
(void) dtq; /* silence compilation warnings */
DBG(11, "<< send_binary_g_table\n");
@ -3696,8 +3696,8 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
handle = handle;
non_blocking = non_blocking; /* silence compilation warnings */
(void) handle;
(void) non_blocking; /* silence compilation warnings */
DBG (10, "<< sane_set_io_mode");
DBG (10, ">>\n");
@ -3708,8 +3708,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle;
fd = fd; /* silence compilation warnings */
(void) handle;
(void) fd; /* silence compilation warnings */
DBG (10, "<< sane_get_select_fd");
DBG (10, ">>\n");

Wyświetl plik

@ -705,9 +705,9 @@ net_avahi_resolve_callback (AvahiServiceResolver *r, AvahiIfIndex interface, Ava
char *t;
/* unused */
interface = interface;
protocol = protocol;
userdata = userdata;
(void) interface;
(void) protocol;
(void) userdata;
if (!r)
return;
@ -759,8 +759,8 @@ net_avahi_browse_callback (AvahiServiceBrowser *b, AvahiIfIndex interface, Avahi
AvahiProtocol proto;
/* unused */
flags = flags;
userdata = userdata;
(void) flags;
(void) userdata;
if (!b)
return;
@ -808,7 +808,7 @@ net_avahi_callback (AvahiClient *c, AvahiClientState state, void * userdata)
int error;
/* unused */
userdata = userdata;
(void) userdata;
if (!c)
return;

Wyświetl plik

@ -157,7 +157,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
SANE_Status status;
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
init_count++;
@ -459,8 +459,8 @@ SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fdp)
{
/* make compiler happy ... */
handle = handle;
fdp = fdp;
(void) handle;
(void) fdp;
DBG (DBG_proc, "sane_get_select_fd: start\n");
DBG (DBG_warn, "sane_get_select_fd: unsupported ...\n");
@ -1595,7 +1595,7 @@ config_attach (SANEI_Config __sane_unused__ * config, const char *devname,
/* currently, the config is a global variable so config is useless here */
/* the correct thing would be to have a generic sanei_attach_matching_devices
* using an attach function with a config parameter */
config = config;
(void) config;
/* the devname has been processed and is ready to be used
* directly. The config struct contains all the configuration data for

Wyświetl plik

@ -1436,7 +1436,7 @@ SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
DBG(DBG_info_sane,"sane_get_select_fd(): not supported (only for non-blocking IO)\n");
handle = handle;
fd = fd;
(void) handle;
(void) fd;
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -1444,7 +1444,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
char dev_name[PATH_MAX], *str;
size_t len;
FILE *fp;
authorize = authorize; /* silence compilation warnings */
(void) authorize; /* silence compilation warnings */
DBG_INIT ();
@ -1511,7 +1511,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
DBG (5, "sane_get_devices: enter\n");
local_only = local_only; /* silence compilation warnings */
(void) local_only; /* silence compilation warnings */
if (devlist)
free (devlist);

Wyświetl plik

@ -485,7 +485,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
char devnam[PATH_MAX] = "/dev/scanner";
FILE *fp;
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG_INIT ();
DBG (11, ">> sane_init\n");
@ -551,7 +551,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
Ricoh_Device *dev;
int i;
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
DBG (11, ">> sane_get_devices\n");
@ -1008,8 +1008,8 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
handle = handle; /* silence gcc */
non_blocking = non_blocking; /* silence gcc */
(void) handle; /* silence gcc */
(void) non_blocking; /* silence gcc */
DBG (5, ">> sane_set_io_mode\n");
DBG (5, "<< sane_set_io_mode\n");
@ -1020,8 +1020,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
DBG (5, ">> sane_get_select_fd\n");
DBG (5, "<< sane_get_select_fd\n");

Wyświetl plik

@ -307,7 +307,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
{
SANE_Status status;
authorize = authorize; /* get rid of compiler warning */
(void) authorize; /* get rid of compiler warning */
/* init ASIC libraries */
sanei_rts88xx_lib_init ();

Wyświetl plik

@ -124,8 +124,8 @@ test_ready (int fd)
static SANE_Status
sense_handler (int scsi_fd, u_char *result, void *arg)
{
scsi_fd = scsi_fd;
arg = arg; /* silence compilation warnings */
(void) scsi_fd;
(void) arg; /* silence compilation warnings */
if (result[0])
{
@ -141,7 +141,7 @@ sense_handler (int scsi_fd, u_char *result, void *arg)
static SANE_Status
stop_scan (int fd)
{
fd = fd; /* silence compilation warnings */
(void) fd; /* silence compilation warnings */
/* XXX don't know how to stop the scanner. To be tested ! */
#if 0
@ -829,7 +829,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* silence compilation warnings */
(void) authorize; /* silence compilation warnings */
DBG_INIT ();
@ -882,7 +882,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
S9036_Device *dev;
int i;
local_only = local_only; /* silence compilation warnings */
(void) local_only; /* silence compilation warnings */
if (devlist)
free (devlist);
@ -1327,7 +1327,7 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
{
handle = handle; /* silence compilation warnings */
(void) handle; /* silence compilation warnings */
DBG (1, "sane_set_io_mode(%d)\n", non_blocking);
@ -1338,8 +1338,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
handle = handle;
fd = fd; /* silence compilation warnings */
(void) handle;
(void) fd; /* silence compilation warnings */
return SANE_STATUS_UNSUPPORTED;
}

Wyświetl plik

@ -66,7 +66,7 @@ static int TransferControlMsg(TInstance *this,
{
SANE_Status err;
cJiffiesTimeout = cJiffiesTimeout;
(void) cJiffiesTimeout;
err = sanei_usb_control_msg (this->hScanner,
nReqType,
@ -95,8 +95,8 @@ static int TransferBulkRead(TInstance *this,
int err;
size_t sz = cchMax;
nEndPoint = nEndPoint;
cJiffiesTimeout = cJiffiesTimeout;
(void) nEndPoint;
(void) cJiffiesTimeout;
err = sanei_usb_read_bulk(this->hScanner,
pBuffer,

Wyświetl plik

@ -385,7 +385,7 @@ sane_init (SANE_Int *version_code, SANE_Auth_Callback authCB)
DBG_INIT();
authCB=authCB; /* compiler */
(void) authCB; /* compiler */
DBG(DEBUG_VERBOSE,"SM3600 init\n");
if (version_code)
@ -783,7 +783,7 @@ sane_cancel (SANE_Handle handle)
SANE_Status
sane_set_io_mode(SANE_Handle h, SANE_Bool m)
{
h=h;
(void) h;
if (m==SANE_TRUE) /* no non-blocking-mode */
return SANE_STATUS_UNSUPPORTED;
return SANE_STATUS_GOOD;
@ -792,6 +792,6 @@ sane_set_io_mode(SANE_Handle h, SANE_Bool m)
SANE_Status
sane_get_select_fd(SANE_Handle handle, SANE_Int *fd)
{
handle=handle; fd=fd;
(void) handle; (void) fd;
return SANE_STATUS_UNSUPPORTED; /* we have no file IO */
}

Wyświetl plik

@ -64,8 +64,8 @@ my_usb_bulk_write (p_usb_dev_handle dev, int ep,
SANE_Status status;
size_t my_size;
timeout = timeout;
ep = ep;
(void) timeout;
(void) ep;
my_size = size;
status =
sanei_usb_write_bulk ((SANE_Int) dev, (SANE_Byte *) bytes, &my_size);
@ -81,8 +81,8 @@ my_usb_bulk_read (p_usb_dev_handle dev, int ep,
SANE_Status status;
size_t my_size;
timeout = timeout;
ep = ep;
(void) timeout;
(void) ep;
my_size = size;
status =
sanei_usb_read_bulk ((SANE_Int) dev, (SANE_Byte *) bytes, &my_size);
@ -98,7 +98,7 @@ my_usb_control_msg (p_usb_dev_handle dev, int requesttype,
{
SANE_Status status;
timeout = timeout;
(void) timeout;
status = sanei_usb_control_msg ((SANE_Int) dev, (SANE_Int) requesttype,
(SANE_Int) request, (SANE_Int) value,
(SANE_Int) index, (SANE_Int) size,

Wyświetl plik

@ -273,7 +273,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
char dev_name[PATH_MAX];
size_t len;
FILE *fp;
authorize = authorize; /* silence compilation warnings */
(void) authorize; /* silence compilation warnings */
DBG_INIT ();
DBG (10, "sane_init\n");
@ -310,7 +310,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
struct sp15c *dev;
int i;
local_only = local_only; /* silence compilation warnings */
(void) local_only; /* silence compilation warnings */
DBG (10, "sane_get_devices\n");
@ -335,7 +335,7 @@ sane_open (SANE_String_Const name, SANE_Handle * handle)
{
struct sp15c *dev = first_dev;
name = name; /* silence compilation warnings */
(void) name; /* silence compilation warnings */
/* Strange, name is not used? */
DBG (10, "sane_open\n");
@ -388,8 +388,8 @@ sane_open (SANE_String_Const name, SANE_Handle * handle)
SANE_Status
sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
{
h = h;
non_blocking = non_blocking; /* silence compilation warnings */
(void) h;
(void) non_blocking; /* silence compilation warnings */
DBG (10, "sane_set_io_mode\n");
return SANE_STATUS_UNSUPPORTED;
@ -399,8 +399,8 @@ sane_set_io_mode (SANE_Handle h, SANE_Bool non_blocking)
SANE_Status
sane_get_select_fd (SANE_Handle h, SANE_Int * fdp)
{
h = h;
fdp = fdp; /* silence compilation warnings */
(void) h;
(void) fdp; /* silence compilation warnings */
DBG (10, "sane_get_select_fd\n");
return SANE_STATUS_UNSUPPORTED;
@ -1080,8 +1080,8 @@ attach_one (const char *name)
static SANE_Status
sense_handler (int scsi_fd, u_char * result, void *arg)
{
scsi_fd = scsi_fd;
arg = arg; /* silence compilation warnings */
(void) scsi_fd;
(void) arg; /* silence compilation warnings */
return request_sense_parse (result);
} /* sense_handler */
@ -1783,7 +1783,7 @@ do_cancel (struct sp15c *scanner)
static void
swap_res (struct sp15c *s)
{
s = s; /* silence compilation warnings */
(void) s; /* silence compilation warnings */
/* for the time being, do nothing */
} /* swap_res */
@ -1815,7 +1815,7 @@ sp15c_set_window_param (struct sp15c *s, int prescan)
int ret;
int active_buffer_size;
prescan = prescan; /* silence compilation warnings */
(void) prescan; /* silence compilation warnings */
wait_scanner (s);
DBG (10, "set_window_param\n");
@ -1950,7 +1950,7 @@ sp15c_start_scan (struct sp15c *s)
static void
sigterm_handler (int signal)
{
signal = signal; /* silence compilation warnings */
(void) signal; /* silence compilation warnings */
sanei_scsi_req_flush_all (); /* flush SCSI queue */
_exit (SANE_STATUS_GOOD);

Wyświetl plik

@ -439,8 +439,8 @@ st400_sense_handler( int fd, SANE_Byte *result, void *arg )
/* ST400_Device *dev = arg; */
SANE_Status status;
fd = fd;
arg = arg; /* silence compilation warnings */
(void) fd;
(void) arg; /* silence compilation warnings */
switch( result[0] & 0x0f ) {
case 0x0:
@ -563,7 +563,7 @@ st400_config_get_arg(char **optP, unsigned long *argP, size_t linenum)
{
int n;
linenum = linenum; /* silence compilation warnings */
(void) linenum; /* silence compilation warnings */
if( sscanf(*optP, "%lu%n", argP, &n) == 1 ) {
*optP += n;

Wyświetl plik

@ -1520,7 +1520,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
DBG (DBG_sane_init, "sane_init\n");
authorize = authorize; /* silence gcc */
(void) authorize; /* silence gcc */
DBG (DBG_error, "This is sane-stv680 version %d.%d-%d\n", SANE_CURRENT_MAJOR,
SANE_CURRENT_MINOR, BUILD);
@ -1584,7 +1584,7 @@ sane_get_devices (const SANE_Device *** device_list, SANE_Bool local_only)
DBG (DBG_proc, "sane_get_devices: enter\n");
local_only = local_only; /* silence gcc */
(void) local_only; /* silence gcc */
if (devlist)
free (devlist);
@ -2073,8 +2073,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
DBG (DBG_proc, "sane_set_io_mode: enter\n");
handle = handle; /* silence gcc */
non_blocking = non_blocking; /* silence gcc */
(void) handle; /* silence gcc */
(void) non_blocking; /* silence gcc */
DBG (DBG_proc, "sane_set_io_mode: exit\n");
@ -2087,8 +2087,8 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
{
DBG (DBG_proc, "sane_get_select_fd: enter\n");
handle = handle; /* silence gcc */
fd = fd; /* silence gcc */
(void) handle; /* silence gcc */
(void) fd; /* silence gcc */
DBG (DBG_proc, "sane_get_select_fd: exit\n");

Wyświetl plik

@ -182,8 +182,8 @@ wait_ready (int fd)
static SANE_Status
sense_handler (int scsi_fd, u_char *result, void *arg)
{
scsi_fd = scsi_fd;
arg = arg; /* silence compilation warnings */
(void) scsi_fd;
(void) arg; /* silence compilation warnings */
switch (result[0])
{
@ -909,7 +909,7 @@ sane_init (SANE_Int *version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* silence compilation warnings */
(void) authorize; /* silence compilation warnings */
DBG_INIT();
@ -962,7 +962,7 @@ sane_get_devices (const SANE_Device ***device_list, SANE_Bool local_only)
Tamarack_Device *dev;
int i;
local_only = local_only; /* silence compilation warnings */
(void) local_only; /* silence compilation warnings */
if (devlist)
free (devlist);

Wyświetl plik

@ -261,8 +261,8 @@ sanei_umaxusb_open (const char *dev, int *fdp,
{
SANE_Status status;
handler = handler; /* silence gcc */
handler_arg = handler_arg; /* silence gcc */
(void) handler; /* silence gcc */
(void) handler_arg; /* silence gcc */
status = sanei_usb_open (dev, fdp);
if (status != SANE_STATUS_GOOD) {
@ -306,7 +306,7 @@ static SANE_Status
sanei_umaxusb_open_extended (const char *dev, int *fdp,
SANEI_SCSI_Sense_Handler handler, void *handler_arg, int *buffersize)
{
buffersize = buffersize;
(void) buffersize;
return(sanei_umaxusb_open(dev, fdp, handler, handler_arg));
}

Wyświetl plik

@ -131,9 +131,9 @@ static SANE_Status
optionNumOptionsCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
info = info; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) info; /* Eliminate warning about unused parameters */
if (action != SANE_ACTION_GET_VALUE)
return SANE_STATUS_INVAL;
@ -173,7 +173,7 @@ optionResolutionCallback (SANE_Option * option, SANE_Handle handle,
SANE_Status status;
SANE_Word autoValue = 75;
handle = handle; /* Eliminate warning about unused parameters */
(void) handle; /* Eliminate warning about unused parameters */
switch (action)
{
@ -217,8 +217,8 @@ static SANE_Status
optionGrayscaleCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
handle = handle;
option = option; /* Eliminate warning about unused parameters */
(void) handle;
(void) option; /* Eliminate warning about unused parameters */
switch (action)
{
@ -261,10 +261,10 @@ optionLampOffCallback (SANE_Option * option, SANE_Handle handle,
SANE_Status res = SANE_STATUS_GOOD;
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
info = info;
value = value;
(void) option;
(void) handle;
(void) info;
(void) value;
if (action != SANE_ACTION_SET_VALUE)
return SANE_STATUS_INVAL;
@ -308,9 +308,9 @@ static SANE_Status
optionTopLeftXCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
option = option;
handle = handle;
value = value; /* Eliminate warning about unused parameters */
(void) option;
(void) handle;
(void) value; /* Eliminate warning about unused parameters */
switch (action)
{
@ -351,8 +351,8 @@ optionTopLeftYCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -394,8 +394,8 @@ optionBotRightXCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -437,8 +437,8 @@ optionBotRightYCallback (SANE_Option * option, SANE_Handle handle,
SANE_Action action, void *value, SANE_Int * info)
{
/* Eliminate warnings about unused parameters */
option = option;
handle = handle;
(void) option;
(void) handle;
switch (action)
{
@ -780,7 +780,7 @@ sane_close (SANE_Handle handle)
const SANE_Option_Descriptor *
sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
{
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3, "sane_get_option_descriptor: option = %d\n", option);
if (option < 0 || option >= NELEMS (so))
@ -792,7 +792,7 @@ SANE_Status
sane_control_option (SANE_Handle handle, SANE_Int option,
SANE_Action action, void *value, SANE_Int * info)
{
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3,
"sane_control_option: handle=%p, opt=%d, act=%d, val=%p, info=%p\n",
@ -812,7 +812,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
SANE_UNFIX (optionBotRightYValue -
optionTopLeftYValue) / MM_IN_INCH * optionResolutionValue;
handle = handle; /* Eliminate compiler warning */
(void) handle; /* Eliminate compiler warning */
DBG (3, "sane_get_parameters\n");
parms.depth = 8;

Wyświetl plik

@ -434,7 +434,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
size_t len;
FILE *fp;
authorize = authorize; /* stop gcc from complaining */
(void) authorize; /* stop gcc from complaining */
DBG_INIT ();
DBG (2, "SANE v4l backend version %d.%d build %d from %s\n", SANE_CURRENT_MAJOR,

Wyświetl plik

@ -2449,7 +2449,7 @@ void
sig_int_term_handler (int signum)
{
/* unused */
signum = signum;
(void) signum;
signal (SIGINT, NULL);
signal (SIGTERM, NULL);
@ -2543,7 +2543,7 @@ saned_avahi_group_callback (AvahiEntryGroup *g, AvahiEntryGroupState state, void
char *n;
/* unused */
userdata = userdata;
(void) userdata;
if ((!g) || (g != avahi_group))
return;
@ -2657,7 +2657,7 @@ saned_avahi_callback (AvahiClient *c, AvahiClientState state, void *userdata)
int error;
/* unused */
userdata = userdata;
(void) userdata;
if (!c)
return;

Wyświetl plik

@ -57,8 +57,8 @@ typedef ppm_dest_struct *ppm_dest_ptr;
METHODDEF (void)
sanei_jpeg_start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
{
cinfo = cinfo;
dinfo = dinfo;
(void) cinfo;
(void) dinfo;
/* header image is supplied for us */
}
@ -66,8 +66,8 @@ sanei_jpeg_start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
METHODDEF (void)
sanei_jpeg_finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)
{
cinfo = cinfo;
dinfo = dinfo;
(void) cinfo;
(void) dinfo;
/* nothing to do */
}
@ -85,9 +85,9 @@ sanei_jpeg_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
JDIMENSION rows_supplied, char *data)
{
ppm_dest_ptr dest = (ppm_dest_ptr) dinfo;
cinfo = cinfo;
dinfo = dinfo;
rows_supplied = rows_supplied;
(void) cinfo;
(void) dinfo;
(void) rows_supplied;
memcpy (data, dest->iobuffer, dest->buffer_width);
}
@ -107,9 +107,9 @@ sanei_jpeg_copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
register JSAMPROW ptr;
register JDIMENSION col;
cinfo = cinfo;
dinfo = dinfo;
rows_supplied = rows_supplied;
(void) cinfo;
(void) dinfo;
(void) rows_supplied;
ptr = dest->pub.buffer[0];
bufferptr = dest->iobuffer;
@ -140,7 +140,7 @@ sanei_jpeg_put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
register JSAMPROW color_map2 = cinfo->colormap[2];
register JDIMENSION col;
rows_supplied = rows_supplied;
(void) rows_supplied;
ptr = dest->pub.buffer[0];
bufferptr = dest->iobuffer;
@ -165,7 +165,7 @@ sanei_jpeg_put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
register JSAMPROW color_map = cinfo->colormap[0];
register JDIMENSION col;
rows_supplied = rows_supplied;
(void) rows_supplied;
ptr = dest->pub.buffer[0];
bufferptr = dest->iobuffer;

Wyświetl plik

@ -527,7 +527,7 @@ sanei_magic_findSkew(SANE_Parameters * params, SANE_Byte * buffer,
DBG (10, "sanei_magic_findSkew: start\n");
dpiX=dpiX;
(void) dpiX;
/* get buffers for edge detection */
topBuf = sanei_magic_getTransY(params,dpiY,buffer,1);
@ -1406,7 +1406,7 @@ getLine (int height, int width, int * buff,
minSlope,maxSlope,minOffset,maxOffset);
/*silence compiler*/
height = height;
(void) height;
if(absMaxSlope < absMinSlope)
absMaxSlope = absMinSlope;