alrevuelta/cONNXr

Wrong printf format string for type int32_t

Opened this issue · 0 comments

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.