trivial diff: fix minor bug in warning message

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Mar 27 19:28:02 AEDT 1998


Estimated hours taken: 0.25

compiler/prog_io_util.m:
	Fix a bug where report_warning/3, which is only called from
	modules.m, was printing a `.m' even though modules.m passed
	it a filename that already included the `.m'.

Index: prog_io_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io_util.m,v
retrieving revision 1.9
diff -u -u -r1.9 prog_io_util.m
--- prog_io_util.m	1998/03/03 17:35:50	1.9
+++ prog_io_util.m	1998/03/20 02:54:52
@@ -349,9 +349,9 @@
 	),
 	io__write_string(Stream, Message).
 
-report_warning(ModuleName, LineNum, Message) -->
-	{ string__format("%s.m:%3d: Warning: %s\n",
-		[s(ModuleName), i(LineNum), s(Message)], FullMessage) },
+report_warning(FileName, LineNum, Message) -->
+	{ string__format("%s:%3d: Warning: %s\n",
+		[s(FileName), i(LineNum), s(Message)], FullMessage) },
 	io__stderr_stream(StdErr),
 	io__write_string(StdErr, FullMessage),
 	globals__io_lookup_bool_option(halt_at_warn, HaltAtWarn),

-- 
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