Commits

Mark Shannon committed c43d71d Draft

Fix compiler warnings

  • Participants
  • Parent commits 30ccbfd

Comments (0)

Files changed (5)

File Include/optimiser.h

 
 extern void _HotPy_ShowStats(void);
 
-#define TRACE_COVERAGE_COUNTS 1
-
 typedef struct _hotpy_trace_object HotPyTraceObject;
 
 typedef struct _hotpy_exit_object {

File Python/trace_D_O_C.c

 static void
 materialise_block(HotPyOptimiser *x, PyTryBlock *b)
 {
-    HotPy_DOC *opt = (HotPy_DOC *)x;
-    assert (opt->top_frame->allocated);
+    assert (((HotPy_DOC *)x)->top_frame->allocated);
     if (b->b_type == FOR_ITER)
         x->next->setup_block(x->next, SETUP_FOR_ITER, b->b_handler, b->b_level);
     else

File Python/trace_manager.c

     return chain;
 }
 
-#ifdef TRACE_COVERAGE_COUNTS
+#ifdef Py_DEBUG
 static void show_stat(char *txt, unsigned long count, double points)
 {
     double div, fract;

File Python/trace_recorder_register.c

         abort();
     }
     CONSISTENT(x);
+    return NULL;
 }
 
 static HotPyContext *
         opcode_with_arg(x, STORE_MEMBER, ((def->type & 31) << 11) | def->offset);
     }
     CONSISTENT(x);
+    return NULL;
 }
 
 static PyMemberDef func_code_def = {
     LivenessEvent *events;
     int event_count;
     int rcount;
-    RelabelEvent *relabels;
+    RelabelEvent *relabels = NULL;
     events = liveness_events(code, count, &event_count, exits);
     if (events == NULL)
         goto fail;

File Python/trace_specialiser.c

     return out;
 }
 
+#ifdef Py_DEBUG
 static void
 show_frame(HotPyOptimiser *x, SpecialiserFrame *f)
 {
     out[0] = '\0';
     x->next->comment(x->next, buf);
 }
+#endif
 
 int
 is_type_info(PyObject *info)
     int frames;
 } HotPySpecialiser;
 
+#ifdef Py_DEBUG
 static void
 show_stack(HotPySpecialiser *opt)
 {
     out[0] = '\0';
     opt->opt_base.next->comment(opt->opt_base.next, buf);
 }
+#endif
 
 static int
 guard_type_attribute(HotPyOptimiser *x, PyObject *type, PyObject *name)