Author: mturk Date: Tue Aug 11 12:01:29 2009 New Revision: 803079 URL: http://svn.apache.org/viewvc?rev=803079&view=rev Log: Cast to size_t
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/sha2.c Modified: commons/sandbox/runtime/trunk/src/main/native/shared/sha2.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/sha2.c?rev=803079&r1=803078&r2=803079&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/shared/sha2.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/shared/sha2.c Tue Aug 11 12:01:29 2009 @@ -416,7 +416,7 @@ if (len == 0) return; - usedspace = (context->bitcount[0] >> 3) % ACR_SHA256_BLOCK_LENGTH; + usedspace = (size_t)((context->bitcount[0] >> 3) % ACR_SHA256_BLOCK_LENGTH); if (usedspace > 0) { /* Calculate how much free space is available in the buffer */ freespace = ACR_SHA256_BLOCK_LENGTH - usedspace; @@ -458,7 +458,7 @@ { unsigned int usedspace; - usedspace = (context->bitcount[0] >> 3) % ACR_SHA256_BLOCK_LENGTH; + usedspace = (size_t)((context->bitcount[0] >> 3) % ACR_SHA256_BLOCK_LENGTH); if (usedspace > 0) { /* Begin padding with a 1 bit: */ context->buffer[usedspace++] = 0x80; @@ -744,7 +744,7 @@ if (len == 0) return; - usedspace = (context->bitcount[0] >> 3) % ACR_SHA512_BLOCK_LENGTH; + usedspace = (size_t)((context->bitcount[0] >> 3) % ACR_SHA512_BLOCK_LENGTH); if (usedspace > 0) { /* Calculate how much free space is available in the buffer */ freespace = ACR_SHA512_BLOCK_LENGTH - usedspace; @@ -786,7 +786,7 @@ { unsigned int usedspace; - usedspace = (context->bitcount[0] >> 3) % ACR_SHA512_BLOCK_LENGTH; + usedspace = (size_t)((context->bitcount[0] >> 3) % ACR_SHA512_BLOCK_LENGTH); if (usedspace > 0) { /* Begin padding with a 1 bit: */ context->buffer[usedspace++] = 0x80;