summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2020-07-05 16:29:57 +0300
committerChris Dickens <christopher.a.dickens@gmail.com>2020-08-10 10:51:42 -0700
commitab68ed469763d8f1e8caa63988015b36526edb61 (patch)
tree4437cab16ee1b5cf511b46943f1548d636412f8d /tests
parentf492968d953f233e6b6946afd402f6718ff7a500 (diff)
downloadlibusb-ab68ed469763d8f1e8caa63988015b36526edb61.tar.gz
stress: test_get_device_list: change printf format for ssize_t
The type of list_size is ssize_t. First idea was to use "%zd" printf format specifier. But that is not supported by Visual Studio 2013. Use "%ld" + cast list_size to long. Closes #751 Suggested-by: Chris Dickens <christopher.a.dickens@gmail.com> Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/stress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/stress.c b/tests/stress.c
index 0e2dbe5..1602ee9 100644
--- a/tests/stress.c
+++ b/tests/stress.c
@@ -60,8 +60,8 @@ static libusb_testlib_result test_get_device_list(libusb_testlib_ctx * tctx)
ssize_t list_size = libusb_get_device_list(ctx, &device_list);
if (list_size < 0 || device_list == NULL) {
libusb_testlib_logf(tctx,
- "Failed to get device list on iteration %d: %d (%p)",
- i, -list_size, device_list);
+ "Failed to get device list on iteration %d: %ld (%p)",
+ i, (long)-list_size, device_list);
return TEST_STATUS_FAILURE;
}
libusb_free_device_list(device_list, 1);