kopia lustrzana https://gitlab.com/sane-project/backends
microtek2: fix another [-Wunused-but-set-variable] compiler warning
This allows for the fact that the backend may be compiled with and without support for authorization.merge-requests/1/head
rodzic
c145877095
commit
8b75c6d450
|
@ -443,11 +443,14 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int *fd)
|
||||||
/*---------- sane_init() -----------------------------------------------------*/
|
/*---------- sane_init() -----------------------------------------------------*/
|
||||||
|
|
||||||
SANE_Status
|
SANE_Status
|
||||||
|
#ifdef HAVE_AUTHORIZATION
|
||||||
sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize)
|
sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize)
|
||||||
|
#else
|
||||||
|
sane_init(SANE_Int *version_code, SANE_Auth_Callback __sane_unused__ authorize)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Microtek2_Device *md;
|
Microtek2_Device *md;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
SANE_Auth_Callback trash;
|
|
||||||
|
|
||||||
|
|
||||||
DBG_INIT();
|
DBG_INIT();
|
||||||
|
@ -459,8 +462,6 @@ sane_init(SANE_Int *version_code, SANE_Auth_Callback authorize)
|
||||||
|
|
||||||
#ifdef HAVE_AUTHORIZATION
|
#ifdef HAVE_AUTHORIZATION
|
||||||
auth_callback = authorize;
|
auth_callback = authorize;
|
||||||
#else
|
|
||||||
trash = authorize; /* prevents compiler warning "unused variable" */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sanei_thread_init();
|
sanei_thread_init();
|
||||||
|
|
Ładowanie…
Reference in New Issue