Skip to content

Commit

Permalink
convert_size2off(): fix different signedness
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Apr 22, 2022
1 parent eaba165 commit 72a9786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/include/kvikio/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ inline constexpr std::size_t page_size = 4096;

[[nodiscard]] inline off_t convert_size2off(std::size_t x)
{
if (x >= std::numeric_limits<off_t>::max()) {
if (x >= static_cast<std::size_t>(std::numeric_limits<off_t>::max())) {
throw CUfileException("size_t argument too large to fit off_t");
}
return static_cast<off_t>(x);
Expand Down

0 comments on commit 72a9786

Please sign in to comment.