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

Calloc warning/error #62

Open
R055A opened this issue Jul 17, 2024 · 0 comments
Open

Calloc warning/error #62

R055A opened this issue Jul 17, 2024 · 0 comments

Comments

@R055A
Copy link

R055A commented Jul 17, 2024

There is a calloc warning/error returned from line 1487 in src/jtag/drivers/ulink.c:

tdo_buffer_start = calloc(sizeof(uint8_t), scan_size_bytes);

The error causes a warning message but this can and is treated as an error, as follows:

Error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument`

A suggested fix is:

tdo_buffer_start = calloc(scan_size_bytes, sizeof(uint8_t));
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 a pull request may close this issue.

1 participant