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

fix: cast int to size_t to quieten compilers. #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Melkor-1
Copy link

@Melkor-1 Melkor-1 commented Jun 3, 2024

In line 1831, a cast is required because malloc() expects a size_t as the first argument and an int was provided. The cast is perfectly safe here, as the number of tests can not be signed. Perhaps the better choice would have been to declare acutest_list_size_ as an unsigned type. GCC-13.1 with -Wconversion complains about this.

In line 1831, a cast is required because `malloc()` expects a `size_t` as the
first argument and an `int` was provided. The cast is perfectly safe here, as
the number of tests can not be signed. Perhaps the better choice would have
been to declare `acutest_list_size_` as an `unsigned` type. GCC-13.1 with
-Wconversion complains about this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant