@@ -247,7 +247,7 @@ ZTEST(os_mgmt_info, test_info_1)
247
247
smp_dummy_disable ();
248
248
249
249
zassert_equal (sizeof (expected_response ), nb -> len ,
250
- "Expected to receive %d bytes but got %d\n" , sizeof (expected_response ),
250
+ "Expected to receive %zu bytes but got %d\n" , sizeof (expected_response ),
251
251
nb -> len );
252
252
253
253
zassert_mem_equal (expected_response , nb -> data , nb -> len ,
@@ -285,7 +285,7 @@ ZTEST(os_mgmt_info, test_info_1)
285
285
smp_dummy_disable ();
286
286
287
287
zassert_equal (sizeof (expected_response ), nb -> len ,
288
- "Expected to receive %d bytes but got %d\n" , sizeof (expected_response ),
288
+ "Expected to receive %zu bytes but got %d\n" , sizeof (expected_response ),
289
289
nb -> len );
290
290
291
291
zassert_mem_equal (expected_response , nb -> data , nb -> len ,
@@ -346,7 +346,7 @@ ZTEST(os_mgmt_info, test_info_2_kernel_name)
346
346
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
347
347
348
348
zassert_equal ((sizeof (response_kernel_name ) - 1 ), output .len ,
349
- "Expected to receive %d bytes but got %d \n" ,
349
+ "Expected to receive %zu bytes but got %zu \n" ,
350
350
(sizeof (response_kernel_name ) - 1 ), output .len );
351
351
352
352
zassert_mem_equal (response_kernel_name , output .value , output .len ,
@@ -407,7 +407,7 @@ ZTEST(os_mgmt_info, test_info_3_node_name)
407
407
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
408
408
409
409
zassert_equal ((sizeof (response_node_name ) - 1 ), output .len ,
410
- "Expected to receive %d bytes but got %d \n" ,
410
+ "Expected to receive %zu bytes but got %zu \n" ,
411
411
(sizeof (response_node_name ) - 1 ), output .len );
412
412
413
413
zassert_mem_equal (response_node_name , output .value , output .len ,
@@ -469,7 +469,7 @@ ZTEST(os_mgmt_info, test_info_4_kernel_release)
469
469
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
470
470
471
471
zassert_equal ((sizeof (response_kernel_release ) - 1 ), output .len ,
472
- "Expected to receive %d bytes but got %d \n" ,
472
+ "Expected to receive %zu bytes but got %zu \n" ,
473
473
(sizeof (response_kernel_release ) - 1 ), output .len );
474
474
475
475
zassert_mem_equal (response_kernel_release , output .value , output .len ,
@@ -531,7 +531,7 @@ ZTEST(os_mgmt_info, test_info_5_kernel_version)
531
531
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
532
532
533
533
zassert_equal ((sizeof (response_kernel_version ) - 1 ), output .len ,
534
- "Expected to receive %d bytes but got %d \n" ,
534
+ "Expected to receive %zu bytes but got %zu \n" ,
535
535
(sizeof (response_kernel_version ) - 1 ), output .len );
536
536
537
537
zassert_mem_equal (response_kernel_version , output .value , output .len ,
@@ -592,7 +592,7 @@ ZTEST(os_mgmt_info, test_info_6_machine)
592
592
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
593
593
594
594
zassert_equal ((sizeof (response_machine ) - 1 ), output .len ,
595
- "Expected to receive %d bytes but got %d \n" , (sizeof (response_machine ) - 1 ),
595
+ "Expected to receive %zu bytes but got %zu \n" , (sizeof (response_machine ) - 1 ),
596
596
output .len );
597
597
598
598
zassert_mem_equal (response_machine , output .value , output .len ,
@@ -653,7 +653,7 @@ ZTEST(os_mgmt_info, test_info_7_processor)
653
653
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
654
654
655
655
zassert_equal ((sizeof (response_processor ) - 1 ), output .len ,
656
- "Expected to receive %d bytes but got %d \n" , (sizeof (response_processor ) - 1 ),
656
+ "Expected to receive %zu bytes but got %zu \n" , (sizeof (response_processor ) - 1 ),
657
657
output .len );
658
658
659
659
zassert_mem_equal (response_processor , output .value , output .len ,
@@ -716,15 +716,15 @@ ZTEST(os_mgmt_info, test_info_8_platform)
716
716
if (sizeof (CONFIG_BOARD_REVISION ) > 1 ) {
717
717
/* Check with board revision */
718
718
zassert_equal ((sizeof (response_board_revision ) - 1 ), output .len ,
719
- "Expected to receive %d bytes but got %d \n" ,
719
+ "Expected to receive %zu bytes but got %zu \n" ,
720
720
(sizeof (response_board_revision ) - 1 ), output .len );
721
721
722
722
zassert_mem_equal (response_board_revision , output .value , output .len ,
723
723
"Expected received data mismatch" );
724
724
} else {
725
725
/* Check without board revision */
726
726
zassert_equal ((sizeof (response_board ) - 1 ), output .len ,
727
- "Expected to receive %d bytes but got %d \n" ,
727
+ "Expected to receive %zu bytes but got %zu \n" ,
728
728
(sizeof (response_board ) - 1 ), output .len );
729
729
730
730
zassert_mem_equal (response_board , output .value , output .len ,
@@ -786,7 +786,7 @@ ZTEST(os_mgmt_info, test_info_9_os)
786
786
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
787
787
788
788
zassert_equal ((sizeof (response_os ) - 1 ), output .len ,
789
- "Expected to receive %d bytes but got %d \n" , (sizeof (response_os ) - 1 ),
789
+ "Expected to receive %zu bytes but got %zu \n" , (sizeof (response_os ) - 1 ),
790
790
output .len );
791
791
792
792
zassert_mem_equal (response_os , output .value , output .len ,
@@ -849,15 +849,15 @@ ZTEST(os_mgmt_info, test_info_10_all)
849
849
if (sizeof (CONFIG_BOARD_REVISION ) > 1 ) {
850
850
/* Check with board revision */
851
851
zassert_equal ((sizeof (response_all_board_revision ) - 1 ), output .len ,
852
- "Expected to receive %d bytes but got %d \n" ,
852
+ "Expected to receive %zu bytes but got %zu \n" ,
853
853
(sizeof (response_all_board_revision ) - 1 ), output .len );
854
854
855
855
zassert_mem_equal (response_all_board_revision , output .value , output .len ,
856
856
"Expected received data mismatch" );
857
857
} else {
858
858
/* Check without board revision */
859
859
zassert_equal ((sizeof (response_all ) - 1 ), output .len ,
860
- "Expected to receive %d bytes but got %d \n" ,
860
+ "Expected to receive %zu bytes but got %zu \n" ,
861
861
(sizeof (response_all ) - 1 ), output .len );
862
862
863
863
zassert_mem_equal (response_all , output .value , output .len ,
@@ -924,7 +924,7 @@ ZTEST(os_mgmt_info, test_info_11_multi_1)
924
924
/* Construct expected response to be compared against */
925
925
sprintf (buffer , "%s %s %s" , response_kernel_release , response_processor , response_os );
926
926
927
- zassert_equal (strlen (buffer ), output .len , "Expected to receive %d bytes but got %d \n" ,
927
+ zassert_equal (strlen (buffer ), output .len , "Expected to receive %zu bytes but got %zu \n" ,
928
928
strlen (buffer ), output .len );
929
929
930
930
zassert_mem_equal (buffer , output .value , output .len , "Expected received data mismatch" );
@@ -991,7 +991,7 @@ ZTEST(os_mgmt_info, test_info_12_multi_2)
991
991
*/
992
992
sprintf (buffer , "%s %s" , response_node_name , response_kernel_version );
993
993
994
- zassert_equal (strlen (buffer ), output .len , "Expected to receive %d bytes but got %d \n" ,
994
+ zassert_equal (strlen (buffer ), output .len , "Expected to receive %zu bytes but got %zu \n" ,
995
995
strlen (buffer ), output .len );
996
996
997
997
zassert_mem_equal (buffer , output .value , output .len , "Expected received data mismatch" );
@@ -1064,7 +1064,7 @@ ZTEST(os_mgmt_info, test_info_13_invalid_1)
1064
1064
1065
1065
zassert_true (ok , "Expected decode to be successful\n" );
1066
1066
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1067
- zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %d \n" , output .len );
1067
+ zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %zu \n" , output .len );
1068
1068
zassert_equal (rc , MGMT_ERR_EINVAL , "Expected to receive EINVAL error but got %d\n" , rc );
1069
1069
}
1070
1070
@@ -1135,7 +1135,7 @@ ZTEST(os_mgmt_info, test_info_14_invalid_2)
1135
1135
1136
1136
zassert_true (ok , "Expected decode to be successful\n" );
1137
1137
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1138
- zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %d \n" , output .len );
1138
+ zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %zu \n" , output .len );
1139
1139
zassert_equal (rc , MGMT_ERR_EINVAL , "Expected to receive EINVAL error but got %d\n" , rc );
1140
1140
}
1141
1141
@@ -1207,7 +1207,7 @@ ZTEST(os_mgmt_info_custom_os, test_info_os_custom)
1207
1207
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1208
1208
1209
1209
zassert_equal ((sizeof (response_os_custom ) - 1 ), output .len ,
1210
- "Expected to receive %d bytes but got %d \n" ,
1210
+ "Expected to receive %zu bytes but got %zu \n" ,
1211
1211
(sizeof (response_os_custom ) - 1 ), output .len );
1212
1212
1213
1213
zassert_mem_equal (response_os_custom , output .value , output .len ,
@@ -1268,7 +1268,7 @@ ZTEST(os_mgmt_info_custom_os_disabled, test_info_os_custom_disabled)
1268
1268
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1269
1269
1270
1270
zassert_equal ((sizeof (response_os ) - 1 ), output .len ,
1271
- "Expected to receive %d bytes but got %d \n" ,
1271
+ "Expected to receive %zu bytes but got %zu \n" ,
1272
1272
(sizeof (response_os ) - 1 ), output .len );
1273
1273
1274
1274
zassert_mem_equal (response_os , output .value , output .len ,
@@ -1341,7 +1341,7 @@ ZTEST(os_mgmt_info_custom_cmd, test_info_cmd_custom)
1341
1341
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1342
1342
1343
1343
zassert_equal ((sizeof (response_custom_cmd ) - 1 ), output .len ,
1344
- "Expected to receive %d bytes but got %d \n" ,
1344
+ "Expected to receive %zu bytes but got %zu \n" ,
1345
1345
(sizeof (response_custom_cmd ) - 1 ), output .len );
1346
1346
1347
1347
zassert_mem_equal (response_custom_cmd , output .value , output .len ,
@@ -1412,7 +1412,7 @@ ZTEST(os_mgmt_info_custom_cmd_disabled, test_info_cmd_custom_disabled)
1412
1412
zassert_true (ok , "Expected decode to be successful\n" );
1413
1413
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1414
1414
1415
- zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %d \n" , output .len );
1415
+ zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %zu \n" , output .len );
1416
1416
1417
1417
zassert_equal (rc , MGMT_ERR_EINVAL , "Expected to receive EINVAL error but got %d\n" , rc );
1418
1418
}
@@ -1481,7 +1481,7 @@ ZTEST(os_mgmt_info_custom_cmd_disabled_verify, test_info_cmd_custom_disabled)
1481
1481
zassert_true (ok , "Expected decode to be successful\n" );
1482
1482
zassert_equal (decoded , 1 , "Expected to receive 1 decoded zcbor element\n" );
1483
1483
1484
- zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %d \n" , output .len );
1484
+ zassert_equal (output .len , 0 , "Expected to receive 0 bytes but got %zu \n" , output .len );
1485
1485
1486
1486
zassert_equal (rc , MGMT_ERR_EINVAL , "Expected to receive EINVAL error but got %d\n" , rc );
1487
1487
0 commit comments