[m-rev.] diff: avoid warnings with MSVC in ssdb library

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Oct 29 01:29:48 AEDT 2011


Branches: main, 11.07

ssdb/ssdb.m:
 	Use don't-care variables for the I/O state in foreign_procs
 	in order to avoid warnings from MSVC.

Julien.

Index: ssdb/ssdb.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/ssdb/ssdb.m,v
retrieving revision 1.39
diff -u -r1.39 ssdb.m
--- ssdb/ssdb.m	10 May 2011 04:12:28 -0000	1.39
+++ ssdb/ssdb.m	28 Oct 2011 14:23:51 -0000
@@ -425,7 +425,7 @@
      get_debugger_state(DebuggerState, !IO).

  :- pragma foreign_proc("Java",
-    get_debugger_state_safer(DebuggerState::out, IO0::di, IO::uo),
+    get_debugger_state_safer(DebuggerState::out, _IO0::di, _IO::uo),
      [will_not_call_mercury, promise_pure, thread_safe, tabled_for_io],
  "
      /*
@@ -441,7 +441,6 @@
      } else {
          DebuggerState = (ssdb.Debugger_state_0) X;
      }
-    IO = IO0;
  ").

  :- pragma foreign_export_enum("Java", debugger_state/0, [],
@@ -454,12 +453,11 @@
  install_sigint_handler(!IO).

  :- pragma foreign_proc("C",
-    install_sigint_handler(IO0::di, IO::uo),
+    install_sigint_handler(_IO0::di, _IO::uo),
      [will_not_call_mercury, promise_pure, thread_safe, may_not_duplicate],
  "
      MR_setup_signal(SIGINT, (MR_Code *) MR_ssdb_sigint_handler,
          MR_FALSE, ""ssdb: cannot install SIGINT signal handler"");
-    IO = IO0;
  ").

  :- pragma foreign_code("C",
@@ -3412,11 +3410,10 @@
  :- pred exit_process(io::di, io::uo) is det.

  :- pragma foreign_proc("C",
-    exit_process(IO0::di, IO::uo),
+    exit_process(_IO0::di, _IO::uo),
      [will_not_call_mercury, promise_pure, tabled_for_io],
  "
      exit(0);
-    IO = IO0;
  ").

  :- pragma foreign_proc("C#",

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list