Skip to content

Commit 5ad4d2b

Browse files
authored
Merge pull request #85 from dgrove-oss/fix_dispatch_io
avoid overflow in dispatch_io test
2 parents 129ac99 + a3b5733 commit 5ad4d2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/dispatch_io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ test_async_read(char *path, size_t size, int option, dispatch_queue_t queue,
448448

449449
static int
450450
test_read_dirs(char **paths, dispatch_queue_t queue, dispatch_group_t g,
451-
dispatch_semaphore_t s, volatile int32_t *bytes, int option)
451+
dispatch_semaphore_t s, volatile uint32_t *bytes, int option)
452452
{
453453
FTS *tree = fts_open(paths, FTS_PHYSICAL|FTS_XDEV, NULL);
454454
if (!tree) {
@@ -505,7 +505,7 @@ test_read_many_files(void)
505505
dispatch_group_t g = dispatch_group_create();
506506
dispatch_semaphore_t s = dispatch_semaphore_create(maxopenfiles);
507507
uint64_t start;
508-
volatile int32_t bytes;
508+
volatile uint32_t bytes;
509509
unsigned int files_read, i;
510510

511511
const dispatch_queue_t queues[] = {

0 commit comments

Comments
 (0)