[前][次][番号順一覧][スレッド一覧]

ruby-changes:53966

From: usa <ko1@a...>
Date: Tue, 4 Dec 2018 15:53:10 +0900 (JST)
Subject: [ruby-changes:53966] usa:r66186 (trunk): unconstify cast to get rid of VC++ warnings

usa	2018-12-04 15:53:05 +0900 (Tue, 04 Dec 2018)

  New Revision: 66186

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66186

  Log:
    unconstify cast to get rid of VC++ warnings

  Modified files:
    trunk/mjit.c
Index: mjit.c
===================================================================
--- mjit.c	(revision 66185)
+++ mjit.c	(revision 66186)
@@ -641,7 +641,7 @@ mjit_init(struct mjit_options *opts) https://github.com/ruby/ruby/blob/trunk/mjit.c#L641
     cc_path = CC_COMMON_ARGS[0];
     verbose(2, "MJIT: CC defaults to %s", cc_path);
     cc_common_args = xmalloc(sizeof(CC_COMMON_ARGS));
-    memcpy(cc_common_args, CC_COMMON_ARGS, sizeof(CC_COMMON_ARGS));
+    memcpy((void *)cc_common_args, CC_COMMON_ARGS, sizeof(CC_COMMON_ARGS));
 #if MJIT_CFLAGS_PIPE
     { /* eliminate a flag incompatible with `-pipe` */
         size_t i, j;
@@ -839,7 +839,7 @@ mjit_finish(int close_handle_p) https://github.com/ruby/ruby/blob/trunk/mjit.c#L839
 
     xfree(header_file); header_file = NULL;
 #endif
-    xfree(cc_common_args); cc_common_args = NULL;
+    xfree((void *)cc_common_args); cc_common_args = NULL;
     xfree(tmp_dir); tmp_dir = NULL;
     xfree(pch_file); pch_file = NULL;
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]