diff --git a/backend/genesys.c b/backend/genesys.c index 4eee50048..ebfde8d87 100644 --- a/backend/genesys.c +++ b/backend/genesys.c @@ -5978,7 +5978,7 @@ attach (SANE_String_Const devname, Genesys_Device ** devp, SANE_Bool may_wait) Genesys_Device *dev = 0; SANE_Int dn, vendor, product; SANE_Status status; - int i; + unsigned int i; DBG (DBG_proc, "attach: start: devp %s NULL, may_wait = %d\n", diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c index a7937475d..cec6ea028 100644 --- a/backend/genesys_devices.c +++ b/backend/genesys_devices.c @@ -3504,3 +3504,6 @@ static Genesys_USB_Device_Entry genesys_usb_device_list[] = { {0x04a9, 0x190a, &canon_lide_210_model}, {0, 0, NULL} }; + +#define MAX_SCANNERS (sizeof(genesys_usb_device_list) / \ + sizeof(genesys_usb_device_list[0])) diff --git a/backend/genesys_low.h b/backend/genesys_low.h index 4e8e81ae2..e7069d49e 100644 --- a/backend/genesys_low.h +++ b/backend/genesys_low.h @@ -316,7 +316,6 @@ typedef enum Genesys_Color_Order Genesys_Color_Order; -#define MAX_SCANNERS 50 #define MAX_RESOLUTIONS 13 #define MAX_DPI 4