[svn] Cast void pointer to char * before doing arithmetic on it.

This commit is contained in:
hniksic 2006-06-21 01:12:12 -07:00
parent 19f9abeb0e
commit 0adf1ccfa0
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-06-21 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (base64_encode): Cast void pointer to char * before
doing arithmetic.
2006-06-20 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (base64_encode): Made TBL const.

View File

@ -1914,7 +1914,7 @@ base64_encode (const void *data, int length, char *dest)
};
const unsigned char *s = data;
/* Theoretical ANSI violation when length < 3. */
const unsigned char *end = data + length - 2;
const unsigned char *end = (const unsigned char *) data + length - 2;
char *p = dest;
/* Transform the 3x8 bits to 4x6 bits, as required by base64. */