]> sjero.net Git - wget/commitdiff
[svn] Cast void pointer to char * before doing arithmetic on it.
authorhniksic <devnull@localhost>
Wed, 21 Jun 2006 08:12:12 +0000 (01:12 -0700)
committerhniksic <devnull@localhost>
Wed, 21 Jun 2006 08:12:12 +0000 (01:12 -0700)
src/ChangeLog
src/utils.c

index 84c666448b07f87b6b8bc6fab01831f33f041470..8b2064fda7e72bf3f2716c343a7909ab3f4d683c 100644 (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.
index 1bda8300e0f2d90c243a5325570f136ffe0c04c5..8900b5b32561d2873121f6ab748a7361962a865e 100644 (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.  */