trivial diff: cast args of MR_make_permanent()

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 6 02:41:05 AEDT 1998


trace/mercury_trace_help.c:
	Fix a bug: cast the second argument of MR_make_permanent() to `Word *'.
	Without this fix, it would get warnings or errors (depending
	on whether you compile with gcc or something more strict)
	when building in non-conservative-gc grades.

Index: trace/mercury_trace_help.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_help.c,v
retrieving revision 1.3
diff -u -r1.3 mercury_trace_help.c
--- mercury_trace_help.c	1998/11/03 04:29:41	1.3
+++ mercury_trace_help.c	1998/11/05 15:27:19
@@ -85,7 +85,7 @@
 		name_on_heap, text_on_heap, &result, &MR_trace_help_system);
 
 	MR_trace_help_system = MR_make_permanent(MR_trace_help_system,
-				MR_trace_help_system_type);
+				(Word *) MR_trace_help_system_type);
 
 	if (ML_HELP_result_is_error(result, &msg)) {
 		return msg;
@@ -153,17 +153,17 @@
 		ML_HELP_help_system_type(&MR_trace_help_system_type);
 		MR_trace_help_system = MR_make_permanent(
 					MR_trace_help_system_type,
-					typeinfo_type);
+					(Word *) typeinfo_type);
 
 		ML_HELP_init(&MR_trace_help_system);
 
 		MR_trace_help_system = MR_make_permanent(MR_trace_help_system,
-					MR_trace_help_system_type);
+					(Word *) MR_trace_help_system_type);
 
 		ML_io_output_stream_type(&output_stream_type);
 		ML_io_stdout_stream(&MR_trace_help_stdout);
 		MR_trace_help_stdout = MR_make_permanent(MR_trace_help_stdout,
-					output_stream_type);
+					(Word *) output_stream_type);
 
 		done = TRUE;
 	}

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list