@@ -972,9 +972,9 @@ test_bson_vector_view_api_fuzz_int8 (void)
972
972
int8_t * expected_elements = bson_malloc (MAX_TESTED_VECTOR_LENGTH * sizeof * expected_elements );
973
973
int8_t * actual_elements = bson_malloc (MAX_TESTED_VECTOR_LENGTH * sizeof * actual_elements );
974
974
for (int fuzz_iter = 0 ; fuzz_iter < FUZZ_TEST_ITERS ; fuzz_iter ++ ) {
975
- int r = rand ();
976
- int r_operation = r & 0xF ;
977
- int r_param = r >> 4 ;
975
+ unsigned r = ( unsigned ) rand ();
976
+ unsigned r_operation = r & 0xFu ;
977
+ size_t r_param = r >> 4 ;
978
978
979
979
if (current_length == 0 || r_operation == 15 ) {
980
980
// Resize and fill
@@ -1028,9 +1028,9 @@ test_bson_vector_view_api_fuzz_float32 (void)
1028
1028
float * expected_elements = bson_malloc (MAX_TESTED_VECTOR_LENGTH * sizeof * expected_elements );
1029
1029
float * actual_elements = bson_malloc (MAX_TESTED_VECTOR_LENGTH * sizeof * actual_elements );
1030
1030
for (int fuzz_iter = 0 ; fuzz_iter < FUZZ_TEST_ITERS ; fuzz_iter ++ ) {
1031
- int r = rand ();
1032
- int r_operation = r & 0xF ;
1033
- int r_param = r >> 4 ;
1031
+ unsigned r = ( unsigned ) rand ();
1032
+ unsigned r_operation = r & 0xFu ;
1033
+ size_t r_param = r >> 4 ;
1034
1034
1035
1035
if (current_length == 0 || r_operation == 15 ) {
1036
1036
// Resize and fill
@@ -1085,9 +1085,9 @@ test_bson_vector_view_api_fuzz_packed_bit (void)
1085
1085
bool * actual_elements = bson_malloc (MAX_TESTED_VECTOR_LENGTH * sizeof * actual_elements );
1086
1086
uint8_t * packed_buffer = bson_malloc ((MAX_TESTED_VECTOR_LENGTH + 7 ) / 8 );
1087
1087
for (int fuzz_iter = 0 ; fuzz_iter < FUZZ_TEST_ITERS ; fuzz_iter ++ ) {
1088
- int r = rand ();
1089
- int r_operation = r & 0xF ;
1090
- int r_param = r >> 4 ;
1088
+ unsigned r = ( unsigned ) rand ();
1089
+ unsigned r_operation = r & 0xFu ;
1090
+ size_t r_param = r >> 4 ;
1091
1091
1092
1092
if (current_length == 0 || r_operation == 15 ) {
1093
1093
// Resize and fill from unpacked bool source
0 commit comments