@@ -100,7 +100,7 @@ _mongoc_scram_buf_write (const char *src,
100
100
uint32_t * outbuflen )
101
101
{
102
102
if (src_len < 0 ) {
103
- src_len = strlen (src );
103
+ src_len = ( int32_t ) strlen (src );
104
104
}
105
105
106
106
if (* outbuflen + src_len >= outbufmax ) {
@@ -455,9 +455,9 @@ _mongoc_scram_step2 (mongoc_scram_t *scram,
455
455
next_comma = memchr (ptr , ',' , (inbuf + inbuflen ) - ptr );
456
456
457
457
if (next_comma ) {
458
- * current_val_len = next_comma - ptr ;
458
+ * current_val_len = ( uint32_t ) ( next_comma - ptr ) ;
459
459
} else {
460
- * current_val_len = (inbuf + inbuflen ) - ptr ;
460
+ * current_val_len = (uint32_t ) (( inbuf + inbuflen ) - ptr ) ;
461
461
}
462
462
463
463
* current_val = bson_malloc (* current_val_len + 1 );
@@ -550,7 +550,7 @@ _mongoc_scram_step2 (mongoc_scram_t *scram,
550
550
goto FAIL ;
551
551
}
552
552
553
- iterations = bson_ascii_strtoll ((char * )val_i , & tmp , 10 );
553
+ iterations = ( int ) bson_ascii_strtoll ((char * )val_i , & tmp , 10 );
554
554
/* tmp holds the location of the failed to parse character. So if it's
555
555
* null, we got to the end of the string and didn't have a parse error */
556
556
@@ -562,7 +562,7 @@ _mongoc_scram_step2 (mongoc_scram_t *scram,
562
562
goto FAIL ;
563
563
}
564
564
565
- _mongoc_scram_salt_password (scram , hashed_password , strlen (
565
+ _mongoc_scram_salt_password (scram , hashed_password , ( uint32_t ) strlen (
566
566
hashed_password ), decoded_salt , decoded_salt_len ,
567
567
iterations );
568
568
@@ -703,9 +703,9 @@ _mongoc_scram_step3 (mongoc_scram_t *scram,
703
703
next_comma = memchr (ptr , ',' , (inbuf + inbuflen ) - ptr );
704
704
705
705
if (next_comma ) {
706
- * current_val_len = next_comma - ptr ;
706
+ * current_val_len = ( uint32_t ) ( next_comma - ptr ) ;
707
707
} else {
708
- * current_val_len = (inbuf + inbuflen ) - ptr ;
708
+ * current_val_len = (uint32_t ) (( inbuf + inbuflen ) - ptr ) ;
709
709
}
710
710
711
711
* current_val = bson_malloc (* current_val_len + 1 );
0 commit comments