For printf(), unsigned integers should use %u as the valid conversion specifier instead of %d. Signed-off-by: Qiumiao Zhang <zhangqiumiao1@xxxxxxxxxx> --- src/testlib/sctputil.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/testlib/sctputil.c b/src/testlib/sctputil.c index 97a04f0..87f2099 100644 --- a/src/testlib/sctputil.c +++ b/src/testlib/sctputil.c @@ -60,13 +60,13 @@ test_print_cmsg(sctp_cmsg_t type, sctp_cmsg_data_t *data) switch(type) { case SCTP_INIT: printf("INIT\n"); - printf(" sinit_num_ostreams %d\n", + printf(" sinit_num_ostreams %u\n", data->init.sinit_num_ostreams); - printf(" sinit_max_instreams %d\n", + printf(" sinit_max_instreams %u\n", data->init.sinit_max_instreams); - printf(" sinit_max_attempts %d\n", + printf(" sinit_max_attempts %u\n", data->init.sinit_max_attempts); - printf(" sinit_max_init_timeo %d\n", + printf(" sinit_max_init_timeo %u\n", data->init.sinit_max_init_timeo); break; @@ -196,15 +196,15 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags, sn = (union sctp_notification *)buf; if (sn->sn_header.sn_type != expected_sn_type) - tst_brkm(TBROK, tst_exit, "Unexpected notification:%d" - "expected:%d", sn->sn_header.sn_type, + tst_brkm(TBROK, tst_exit, "Unexpected notification:%u" + "expected:%u", sn->sn_header.sn_type, expected_sn_type); switch(sn->sn_header.sn_type){ case SCTP_ASSOC_CHANGE: if (sn->sn_assoc_change.sac_state != expected_additional) - tst_brkm(TBROK, tst_exit, "Unexpected sac_state:%d " - "expected:%d", sn->sn_assoc_change.sac_state, + tst_brkm(TBROK, tst_exit, "Unexpected sac_state:%u " + "expected:%u", sn->sn_assoc_change.sac_state, expected_additional); break; default: -- 2.27.0