From 6d2abd0990fb4a0fdeece447c5ea0b8ff28ed370 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Sat, 25 Nov 2023 12:20:41 +0000 Subject: [PATCH] tests: Mark callbacks as LIBUSB_CALL Fixes #1337 --- libusb/version_nano.h | 2 +- tests/init_context.c | 4 ++-- tests/set_option.c | 2 +- tests/umockdev.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 6d87cde..d3d09fb 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11819 +#define LIBUSB_NANO 11820 diff --git a/tests/init_context.c b/tests/init_context.c index 8765fda..80b93fd 100644 --- a/tests/init_context.c +++ b/tests/init_context.c @@ -110,8 +110,8 @@ static libusb_testlib_result test_init_context_log_level(void) { LIBUSB_TEST_CLEAN_EXIT(TEST_STATUS_SUCCESS); } -static void test_log_cb(libusb_context *ctx, enum libusb_log_level level, - const char *str) { +static void LIBUSB_CALL test_log_cb(libusb_context *ctx, enum libusb_log_level level, + const char *str) { UNUSED(ctx); UNUSED(level); UNUSED(str); diff --git a/tests/set_option.c b/tests/set_option.c index 19f9b44..6d6ff45 100644 --- a/tests/set_option.c +++ b/tests/set_option.c @@ -192,7 +192,7 @@ static libusb_testlib_result test_no_discovery(void) } #if defined(ENABLE_LOGGING) && !defined(ENABLE_DEBUG_LOGGING) -static void test_log_cb(libusb_context *ctx, enum libusb_log_level level, +static void LIBUSB_CALL test_log_cb(libusb_context *ctx, enum libusb_log_level level, const char *str) { UNUSED(ctx); UNUSED(level); diff --git a/tests/umockdev.c b/tests/umockdev.c index 9362b06..67b7474 100644 --- a/tests/umockdev.c +++ b/tests/umockdev.c @@ -876,7 +876,7 @@ transfer_submit_all_retry(TestThreadedSubmit *data) return NULL; } -static void +static void LIBUSB_CALL test_threaded_submit_transfer_cb(struct libusb_transfer *transfer) { TestThreadedSubmit *data = transfer->user_data; @@ -955,7 +955,7 @@ test_threaded_submit(UMockdevTestbedFixture * fixture, UNUSED_DATA) g_free (c); } -static int +static int LIBUSB_CALL hotplug_count_arrival_cb(libusb_context *ctx, libusb_device *device, libusb_hotplug_event event, @@ -972,7 +972,7 @@ hotplug_count_arrival_cb(libusb_context *ctx, } #ifdef UMOCKDEV_HOTPLUG -static int +static int LIBUSB_CALL hotplug_count_removal_cb(libusb_context *ctx, libusb_device *device, libusb_hotplug_event event,