Skip to content

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

Open
Melkor-1 wants to merge 1 commit intomity:masterfrom
Melkor-1:fix-conversion
Open

fix: cast int to size_t to quieten compilers.#76
Melkor-1 wants to merge 1 commit intomity:masterfrom
Melkor-1:fix-conversion

Conversation

@Melkor-1
Copy link
Copy Markdown

@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