[m-rev.] diff: avoid C compiler warning in low-level C grades
Julien Fischer
juliensf at csse.unimelb.edu.au
Wed Jan 11 16:16:04 AEDT 2012
Branches: main, 11.07
Avoid a C compiler warning in low-level C grades that do not use non-local
gotos.
runtime/mercury_engine.c:
Add a return statement to the function engine_done in order to
avoid a warning about it being missing. (Since we longjump out
of that function it won't ever be executed.)
Julien.
Index: runtime/mercury_engine.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_engine.c,v
retrieving revision 1.68
diff -u -r1.68 mercury_engine.c
--- runtime/mercury_engine.c 16 Oct 2011 03:34:39 -0000 1.68
+++ runtime/mercury_engine.c 11 Jan 2012 05:12:46 -0000
@@ -638,6 +638,7 @@
MR_save_registers();
MR_debugmsg0("longjmping out...\n");
longjmp(*(MR_ENGINE(MR_eng_jmp_buf)), 1);
+ return NULL; /* Not executed, but required to suppress warnings. */
}
static MR_Code *
--------------------------------------------------------------------------
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