Skip to content

Wrong printf format string for type int32_t #76

@Coderitter-GmbH

Description

@Coderitter-GmbH

While porting cONNXr to RISC-V, i noticed that "%d" is used to print a int32_t. That might work on a x86 and x64, but on the RISC-V platform i am working with the int size != the size of int32_t.

The solution is to, exchange %d with %" PRId32 ", which is a compiler macro which chooses the right format string depending on platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions