Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit type cast to work around compiler error during build in Arch Linux's DKMS hook #12

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/dma_buf.cpp
Expand Up @@ -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<decltype(tenstorrent_allocate_dma_buf_in::buf_index)>::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<int>(buf_max))
THROW_TEST_FAILURE("DMA buf allocation with too-large index was permitted unexpectedly.");

Expand Down