Suppressed MSVC++ warning C4244

'return': conversion from '__int64' to 'int', possible loss of data
pull/2905/head
Matthias Moulin 2020-01-16 18:21:28 +01:00 committed by GitHub
parent 651c2ef5fe
commit 715337aa0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
{ {
state_in->result = result; state_in->result = result;
state_in->step = step_A; state_in->step = step_A;
return codechar - code_out; return (int)(codechar - code_out);
} }
fragment = *plainchar++; fragment = *plainchar++;
result = (fragment & 0x0fc) >> 2; result = (fragment & 0x0fc) >> 2;
@ -53,7 +53,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
{ {
state_in->result = result; state_in->result = result;
state_in->step = step_B; state_in->step = step_B;
return codechar - code_out; return (int)(codechar - code_out);
} }
fragment = *plainchar++; fragment = *plainchar++;
result |= (fragment & 0x0f0) >> 4; result |= (fragment & 0x0f0) >> 4;
@ -64,7 +64,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
{ {
state_in->result = result; state_in->result = result;
state_in->step = step_C; state_in->step = step_C;
return codechar - code_out; return (int)(codechar - code_out);
} }
fragment = *plainchar++; fragment = *plainchar++;
result |= (fragment & 0x0c0) >> 6; result |= (fragment & 0x0c0) >> 6;
@ -81,7 +81,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
} }
} }
/* control should not reach here */ /* control should not reach here */
return codechar - code_out; return (int)(codechar - code_out);
} }
int base64_encode_blockend(char* code_out, base64_encodestate* state_in) int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
@ -104,6 +104,6 @@ int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
} }
*codechar++ = '\n'; *codechar++ = '\n';
return codechar - code_out; return (int)(codechar - code_out);
} }