summaryrefslogtreecommitdiff
path: root/testsuite/sanei/sanei_usb_test.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-05-24 21:03:56 +0200
commit58912f68c2489bcee787599837447e0d64dfd61a (patch)
treedda50aadde35fe152da1a8d50769987ace0f1496 /testsuite/sanei/sanei_usb_test.c
parentcfd27ef2ad8b005fd47ab41ef29b71d9e3d48201 (diff)
New upstream version 1.0.27upstream/1.0.27
Diffstat (limited to 'testsuite/sanei/sanei_usb_test.c')
-rw-r--r--testsuite/sanei/sanei_usb_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/testsuite/sanei/sanei_usb_test.c b/testsuite/sanei/sanei_usb_test.c
index 4c5240e..c2cc0c3 100644
--- a/testsuite/sanei/sanei_usb_test.c
+++ b/testsuite/sanei/sanei_usb_test.c
@@ -48,7 +48,7 @@ static int
test_init (int expected)
{
/* initialize USB */
- printf ("%s starting ...\n", __FUNCTION__);
+ printf ("%s starting ...\n", __func__);
sanei_usb_init ();
if (initialized == 0)
{
@@ -63,7 +63,7 @@ test_init (int expected)
}
printf ("sanei_usb initialized, use count is %d ...\n", initialized);
- printf ("%s success\n\n", __FUNCTION__);
+ printf ("%s success\n\n", __func__);
return 1;
}
@@ -75,7 +75,7 @@ test_init (int expected)
static int
test_exit (int expected)
{
- printf ("%s starting ...\n", __FUNCTION__);
+ printf ("%s starting ...\n", __func__);
/* end of USB use test */
sanei_usb_exit ();
@@ -86,7 +86,7 @@ test_exit (int expected)
return 0;
}
- printf ("%s success\n\n", __FUNCTION__);
+ printf ("%s success\n\n", __func__);
return 1;
}
@@ -130,13 +130,13 @@ create_mock_device (char *devname, device_list_type * device)
device->devname = strdup (devname);
device->vendor = 0xdead;
device->product = 0xbeef;
-#if defined(HAVE_LIBUSB) || defined(HAVE_LIBUSB_1_0)
+#if defined(HAVE_LIBUSB_LEGACY) || defined(HAVE_LIBUSB)
device->method = sanei_usb_method_libusb;
#endif
#ifdef HAVE_USBCALLS
device->method = sanei_usb_method_usbcalls;
#endif
-#if !defined(HAVE_LIBUSB) && !defined(HAVE_LIBUSB_1_0) && !defined(HAVE_USBCALLS)
+#if !defined(HAVE_LIBUSB_LEGACY) && !defined(HAVE_LIBUSB) && !defined(HAVE_USBCALLS)
device->method == sanei_usb_method_scanner_driver;
#endif
}
@@ -689,7 +689,7 @@ test_vendor_by_id (void)
static int
test_timeout (void)
{
-#if defined(HAVE_LIBUSB) || defined(HAVE_LIBUSB_1_0)
+#if defined(HAVE_LIBUSB_LEGACY) || defined(HAVE_LIBUSB)
int timeout = libusb_timeout;
sanei_usb_set_timeout (5000);
@@ -827,21 +827,21 @@ test_attach (void)
}
int
-main (int argc, char **argv)
+main (int __sane_unused__ argc, char **argv)
{
int detected, opened, i;
SANE_Int dn[MAX_DEVICES];
-#ifdef HAVE_LIBUSB
+#ifdef HAVE_LIBUSB_LEGACY
printf ("\n%s built with old libusb\n\n", argv[0]);
#endif
-#ifdef HAVE_LIBUSB_1_0
+#ifdef HAVE_LIBUSB
printf ("\n%s built with libusb-1.0\n\n", argv[0]);
#endif
#ifdef HAVE_USBCALLS
printf ("\n%s built with usbcalls\n\n", argv[0]);
#endif
-#if !defined(HAVE_LIBUSB) && !defined(HAVE_LIBUSB_1_0) && !defined(HAVE_USBCALLS)
+#if !defined(HAVE_LIBUSB_LEGACY) && !defined(HAVE_LIBUSB) && !defined(HAVE_USBCALLS)
printf ("\n%s relying on deprecated scanner kernel module\n", argv[0]);
#endif