1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Missing const found by -Wwrite-strings.

Originally committed as revision 11838 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-02-03 21:56:13 +00:00
parent 9d6a96af24
commit f522310b6d
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ const int av_sha1_size = sizeof(AVSHA1);
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */ /* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
#define blk0(i) (block[i] = be2me_32(((uint32_t*)buffer)[i])) #define blk0(i) (block[i] = be2me_32(((const uint32_t*)buffer)[i]))
#define blk(i) (block[i] = rol(block[i-3]^block[i-8]^block[i-14]^block[i-16],1)) #define blk(i) (block[i] = rol(block[i-3]^block[i-8]^block[i-14]^block[i-16],1))
#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y) +blk0(i)+0x5A827999+rol(v,5);w=rol(w,30); #define R0(v,w,x,y,z,i) z+=((w&(x^y))^y) +blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
@ -45,7 +45,7 @@ const int av_sha1_size = sizeof(AVSHA1);
/* Hash a single 512-bit block. This is the core of the algorithm. */ /* Hash a single 512-bit block. This is the core of the algorithm. */
static void transform(uint32_t state[5], uint8_t buffer[64]){ static void transform(uint32_t state[5], const uint8_t buffer[64]){
uint32_t block[80]; uint32_t block[80];
unsigned int i, a, b, c, d, e; unsigned int i, a, b, c, d, e;
@ -105,7 +105,7 @@ void av_sha1_init(AVSHA1* ctx){
ctx->count = 0; ctx->count = 0;
} }
void av_sha1_update(AVSHA1* ctx, uint8_t* data, unsigned int len){ void av_sha1_update(AVSHA1* ctx, const uint8_t* data, unsigned int len){
unsigned int i, j; unsigned int i, j;
j = ctx->count & 63; j = ctx->count & 63;

View File

@ -28,7 +28,7 @@ extern const int av_sha1_size;
struct AVSHA1; struct AVSHA1;
void av_sha1_init(struct AVSHA1* context); void av_sha1_init(struct AVSHA1* context);
void av_sha1_update(struct AVSHA1* context, uint8_t* data, unsigned int len); void av_sha1_update(struct AVSHA1* context, const uint8_t* data, unsigned int len);
void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]); void av_sha1_final(struct AVSHA1* context, uint8_t digest[20]);
#endif /* FFMPEG_SHA1_H */ #endif /* FFMPEG_SHA1_H */