[AC21.5] Cast malloc result

Vin Shelton <[email protected]> Tue, 24 Mar 2015 17:19:53 -0400
Newsgroups gmane.emacs.xemacs.patches
Message-ID <CACeGjnV=+g5i2mju8jJy05jYb1SRqJeoSE5ksC0vqOcbCCMnkw@mail.gmail.com>
APPROVE COMMIT 21.5

While catching up on a 21.5 Windows native build kit, I came across a
Visual Studio 6 error and needed to make this patch:

diff -r 4949ccab25f1 -r 0cebf04c18b5 src/ChangeLog
--- a/src/ChangeLog Tue Mar 24 15:50:43 2015 -0400
+++ b/src/ChangeLog Tue Mar 24 16:49:53 2015 -0400
@@ -1,5 +1,8 @@
 2015-03-24  Vin Shelton  <[email protected]>

+ * data.c (build_fixnum_to_char_map): Cast cctable malloc call to
+ avoid warning from VS6.
+
  * process-unix.c:  Move disconnect_controlling_terminal() call
  later in create_process_unix().  This is necessary for Cygwin, but
  seems to work on linux (at least), too.
diff -r 4949ccab25f1 -r 0cebf04c18b5 src/data.c
--- a/src/data.c Tue Mar 24 15:50:43 2015 -0400
+++ b/src/data.c Tue Mar 24 16:49:53 2015 -0400
@@ -1522,7 +1522,7 @@
   map_char_table (radix_table, &ctr, find_highest_value, &highest_value);
   cclen = XFIXNUM (highest_value) + 1;

-  cctable = malloc (sizeof (Ichar) * cclen);
+  cctable = (Ichar *)malloc (sizeof (Ichar) * cclen);
   if (cctable == NULL)
     {
       out_of_memory ("Could not allocate data for `digit-char'", Qunbound);

  - Vin