From 758be4767c19644e013213cb6b6a39ccb37db37e Mon Sep 17 00:00:00 2001 From: Martin Chang Date: Wed, 20 Mar 2024 23:30:59 +0800 Subject: [PATCH] fix: explicit type cast to work around compiler error during build --- test/dma_buf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dma_buf.cpp b/test/dma_buf.cpp index 95718a1..f8db57b 100644 --- a/test/dma_buf.cpp +++ b/test/dma_buf.cpp @@ -72,7 +72,7 @@ AllocateDmaBufUpTo(int dev_fd, std::uint32_t size, std::uint8_t index) void VerifyTooLargeIndexFails(int dev_fd) { if (TENSTORRENT_MAX_DMA_BUFS <= std::numeric_limits::max()) { - auto buf_max = AllocateDmaBuf(dev_fd, page_size(), TENSTORRENT_MAX_DMA_BUFS); + auto buf_max = AllocateDmaBuf(dev_fd, page_size(), (std::uint8_t)TENSTORRENT_MAX_DMA_BUFS); if (!std::holds_alternative(buf_max)) THROW_TEST_FAILURE("DMA buf allocation with too-large index was permitted unexpectedly.");