Skip to content

Commit

Permalink
Fix printf format string for int32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Coderitter GmbH committed Jan 11, 2021
1 parent b24de30 commit ae5e8f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/test/test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ void compareAlmostEqualTensorProto(Onnx__TensorProto *a, Onnx__TensorProto *b)
debug_print_dims(a->n_dims, a->dims);
printf("\nAsserting, b dims:\n");
debug_print_dims(b->n_dims, b->dims);
printf("\nAsserting, a data_type: %d\n", a->data_type);
printf("\nAsserting, a data_type: %" PRId32 "\n", a->data_type);
CU_ASSERT_EQUAL(a->data_type, b->data_type);
printf("\nAsserting, b data_type: %d\n", b->data_type);
printf("\nAsserting, b data_type: %" PRId32 "\n", b->data_type);
CU_ASSERT_EQUAL(a->n_dims, b->n_dims);
for (int d = 0; d < a->n_dims; d++)
{
Expand Down Expand Up @@ -50,7 +50,7 @@ void compareAlmostEqualTensorProto(Onnx__TensorProto *a, Onnx__TensorProto *b)
CU_ASSERT_EQUAL(a->n_int32_data, b->n_int32_data);
for(int i = 0; i < a->n_int32_data; i++)
{
TRACE_LEVEL0("ASSERTING EQUAL: %d, %d\n", a->int32_data[i], b->int32_data[i]);
TRACE_LEVEL0("ASSERTING EQUAL: %" PRId32 ", %" PRId32 "\n", a->int32_data[i], b->int32_data[i]);
CU_ASSERT_EQUAL(a->int32_data[i], b->int32_data[i]);
}
break;
Expand All @@ -68,7 +68,7 @@ void compareAlmostEqualTensorProto(Onnx__TensorProto *a, Onnx__TensorProto *b)
CU_ASSERT_EQUAL(a->n_int32_data, b->n_int32_data);
for(int i = 0; i < a->n_int32_data; i++)
{
TRACE_LEVEL0("ASSERTING EQUAL: %d, %d\n", a->int32_data[i], b->int32_data[i]);
TRACE_LEVEL0("ASSERTING EQUAL: %" PRId32 ", %" PRId32 "\n", a->int32_data[i], b->int32_data[i]);
CU_ASSERT_EQUAL(a->int32_data[i], b->int32_data[i]);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion src/connxr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int argc, char **argv){
//debug_prettyprint_model(model);
convertRawDataOfTensorProto(inp0set0);

printf("values = %d\n", inp0set0->data_type);
printf("values = %" PRId32 "\n", inp0set0->data_type);

inp0set0->name = model->graph->input[0]->name;

Expand Down

0 comments on commit ae5e8f5

Please sign in to comment.