diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-07-15 11:25:39 +0200 |
commit | 1edb02101a9306fc711cd422ed507d18165b1691 (patch) | |
tree | bd2d48a139bfbe869f4f49359b63097931a45e7b /testsuite/sanei/sanei_usb_test.c | |
parent | 2ca8a81bd0d99fe4d75c229d0e988d8ef710285f (diff) |
move from support/1.0.27 to feature/1.0.27
Diffstat (limited to 'testsuite/sanei/sanei_usb_test.c')
-rw-r--r-- | testsuite/sanei/sanei_usb_test.c | 22 |
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 |