[m-dev.] trivial diff: fix C compiler warnings

Simon Taylor stayl at cs.mu.OZ.AU
Wed Sep 20 14:29:29 AEDT 2000



Estimated hours taken: 0.1

runtime/mercury_deep_copy_body.h:
library/std_util.m:
	Fix some C compiler warnings introduced by my tuples changes. 


Index: runtime/mercury_deep_copy_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_deep_copy_body.h,v
retrieving revision 1.25
diff -u -u -r1.25 mercury_deep_copy_body.h
--- runtime/mercury_deep_copy_body.h	2000/09/18 11:52:29	1.25
+++ runtime/mercury_deep_copy_body.h	2000/09/20 03:10:08
@@ -460,7 +460,7 @@
                 arity = MR_TYPEINFO_GET_TUPLE_ARITY(type_info);
 
                 if (arity == 0) {
-                        new_data = NULL;
+                        new_data = (MR_Word) NULL;
                 } else {
                         /* allocate space for the new tuple */
                         incr_saved_hp(new_data, arity);
Index: library/std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.197
diff -u -u -r1.197 std_util.m
--- library/std_util.m	2000/09/18 11:52:20	1.197
+++ library/std_util.m	2000/09/20 03:08:09
@@ -1916,7 +1916,7 @@
                 arity = MR_TYPEINFO_GET_TUPLE_ARITY(type_info);
     
                 if (arity == 0) {
-                    new_data = NULL;
+                    new_data = (MR_Word) NULL;
                 } else {
                     incr_hp_msg(new_data, arity, MR_PROC_LABEL,
                             ""<created by std_util:construct/3>"");
@@ -1982,7 +1982,7 @@
 	** Create the tuple.
 	*/
 	if (Arity == 0) {
-		new_data = NULL;
+		new_data = (MR_Word) NULL;
 	} else {
 		incr_hp_msg(new_data, Arity, MR_PROC_LABEL,
 			""<created by std_util:construct_tuple/1>"");
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list