Skip to content

Calloc warning/error #10

Closed
Closed
@R055A

Description

@R055A

There is a calloc warning/error returned from line 1524 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));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions