[m-rev.] trivial diff: avoid yet more gcc warnings

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Mar 2 23:13:40 AEDT 2006


Estimated hours taken: 0.2
Branches: main

library/exception.m:
library/std_util.m:
	Avoid warnings about cast expressions as lvalues.
Julien.

Index: exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.103
diff -u -r1.103 exception.m
--- exception.m	14 Dec 2005 10:33:53 -0000	1.103
+++ exception.m	2 Mar 2006 12:03:31 -0000
@@ -1773,7 +1773,7 @@
 	swap_heaps_temp_hp_zone = MR_ENGINE(MR_eng_heap_zone);		\\
 									\\
 	/* set heap to solutions heap */				\\
-	MR_hp = MR_sol_hp;						\\
+	MR_hp_word = (MR_Word) MR_sol_hp;				\\
 	MR_ENGINE(MR_eng_heap_zone) =					\\
 		MR_ENGINE(MR_eng_solutions_heap_zone);			\\
 									\\
@@ -2362,7 +2362,7 @@

 	/* reset the heap */
 	assert(MR_EXCEPTION_STRUCT->MR_excp_heap_ptr <= MR_hp);
-	MR_hp = MR_EXCEPTION_STRUCT->MR_excp_heap_ptr;
+	MR_hp_word = (MR_Word) MR_EXCEPTION_STRUCT->MR_excp_heap_ptr;

 	/* MR_deep_copy the exception back to the ordinary heap */
 	assert(MR_EXCEPTION_STRUCT->MR_excp_solns_heap_ptr <=
Index: std_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/std_util.m,v
retrieving revision 1.304
diff -u -r1.304 std_util.m
--- std_util.m	25 Nov 2005 05:40:43 -0000	1.304
+++ std_util.m	2 Mar 2006 12:07:00 -0000
@@ -1168,7 +1168,7 @@
     MR_ENGINE(MR_eng_heap_zone) = MR_ENGINE(MR_eng_solutions_heap_zone);
     MR_ENGINE(MR_eng_solutions_heap_zone) = temp_zone;
     temp_hp = MR_hp;
-    MR_hp = MR_sol_hp;
+    MR_hp_word = (MR_Word) MR_sol_hp;
     MR_sol_hp = temp_hp;
 #endif
 }").

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list