[m-rev.] diff: avoid using uninitialized locals in trace lib

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Nov 13 21:47:54 AEDT 2011


Branches: main, 11.07

trace/mercury_trace_tables.c:
 	Fix a spot where uninitialized local variables were being used.

Julien.

Index: trace/mercury_trace_tables.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_tables.c,v
retrieving revision 1.53
diff -u -r1.53 mercury_trace_tables.c
--- trace/mercury_trace_tables.c	28 Sep 2011 07:09:45 -0000	1.53
+++ trace/mercury_trace_tables.c	13 Nov 2011 07:08:14 -0000
@@ -1857,6 +1857,8 @@
      var_count_neg  = 0;
      var_count_zero = 0;
      var_count_pos  = 0;
+    no_long = 0;
+    some_long = 0;

      total = 0;
      for (port = 0; port < MR_PORT_NUM_PORTS; port++) {

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