[m-rev.] diff: fix various minor problems

Julien Fischer jfischer at opturion.com
Fri Mar 27 13:38:29 AEDT 2015


Fix various minor problems.

Mmakefile:
 	Run the realclean_tests target *before* the realclean_subdirs
 	target since the former requires scripts/mmake to exist and
 	the latter deletes it.

tests/debugger/save.exp:
 	Update this expected output to conform to recent changes.
 	(The .exp2 file was updated as part of those changes, but
 	this one wasn't.)

trace/mercury_trace_cmd_breakpoint.c:
trace/mercury_trace_source.c:
 	Avoid warnings from GCC.

diff --git a/Mmakefile b/Mmakefile
index a97989d..dd4ebd1 100644
--- a/Mmakefile
+++ b/Mmakefile
@@ -786,7 +786,7 @@ bindist: WORK_IN_PROGRESS TODO

  #-----------------------------------------------------------------------------#

-clean: clean_subdirs clean_tests
+clean: clean_tests clean_subdirs

  .PHONY: clean_subdirs
  clean_subdirs:
@@ -801,7 +801,7 @@ clean_tests:
  		(cd tests; $(MMAKE) clean) \
  	fi

-realclean: realclean_subdirs realclean_local realclean_tests
+realclean: realclean_tests realclean_subdirs realclean_local

  .PHONY: realclean_local
  realclean_local: realclean_config realclean_docs
diff --git a/tests/debugger/save.exp b/tests/debugger/save.exp
index a6417c7..45b5f8c 100644
--- a/tests/debugger/save.exp
+++ b/tests/debugger/save.exp
@@ -1,4 +1,4 @@
-       1:      1  1 CALL pred save.main/2-0 (cc_multi) save.m:17
+       1:      1  1 CALL pred save.main/2-0 (cc_multi) save.m:19
  mdb> echo on
  Command echo enabled.
  mdb> register --quiet
diff --git a/trace/mercury_trace_cmd_breakpoint.c b/trace/mercury_trace_cmd_breakpoint.c
index e65f8f3..e1d95ae 100644
--- a/trace/mercury_trace_cmd_breakpoint.c
+++ b/trace/mercury_trace_cmd_breakpoint.c
@@ -466,7 +466,7 @@ MR_trace_cmd_break(char **words, int word_count, MR_TraceCmdInfo *cmd,
              }

              sprintf(buf, "\nWhich do you want to put "
-                "a breakpoint on (0-%d or *)? ",
+                "a breakpoint on (0-%" MR_INTEGER_LENGTH_MODIFIER "u or *)? ",
                  matching_port_count - 1);
              line2 = MR_trace_getline(buf, MR_mdb_in, MR_mdb_out);
              if (line2 == NULL) {
diff --git a/trace/mercury_trace_source.c b/trace/mercury_trace_source.c
index f440923..9509bea 100644
--- a/trace/mercury_trace_source.c
+++ b/trace/mercury_trace_source.c
@@ -264,7 +264,7 @@ MR_trace_source_open_server(MR_TraceSourceServer *server,
      name = MR_malloc(base_len + 10);
      do {
          i++;
-        sprintf(name, "%s.%d", MR_SOURCE_SERVER_BASENAME, i);
+        sprintf(name, "%s.%lu", MR_SOURCE_SERVER_BASENAME, (unsigned long)i);
          /*
          ** This should fail if there is no server with this
          ** name.



More information about the reviews mailing list